Function decodeFrameType [src]

Returns the kind of frame at the beginning of source. Errors returned: error.BadMagic if source begins with bytes not equal to the Zstandard frame magic number, or outside the range of magic numbers for skippable frames. error.EndOfStream if source contains fewer than 4 bytes

Prototype

pub fn decodeFrameType(source: anytype) error{ BadMagic, EndOfStream }!frame.Kind

Possible Errors

BadMagic
EndOfStream

Source

pub fn decodeFrameType(source: anytype) error{ BadMagic, EndOfStream }!frame.Kind { const magic = try source.readInt(u32, .little); return frameType(magic); }