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

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

Parameters

source: anytype,