Documentation
¶
Index ¶
- func Decode(b []byte) (protocol.Value, error)
- func DecodeProfile(b []byte, profile string, options DecodeOptions) (protocol.Value, error)
- func DecodeWithStrict(b []byte, strict bool) (protocol.Value, error)
- func DeflateZlib(b []byte) ([]byte, error)
- func Encode(v protocol.Value, profile string) ([]byte, error)
- func InflateZlib(b []byte) ([]byte, error)
- func InflateZlibLimit(b []byte, limit int64) ([]byte, error)
- func IsZlib(b []byte) bool
- type DecodeOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeProfile ¶
func DeflateZlib ¶
FF AD signature followed by a zlib stream at the fastest level, mirroring the jars' PlatformZlibByteEncoder. The compressed bytes are deterministic for a given implementation but are not guaranteed byte-identical across zlib libraries, so wire-exact comparison of zlib output is reference-local.
func InflateZlib ¶
InflateZlib decompresses a PlatformZlib payload. It requires the FF AD signature followed by a standard zlib (RFC 1950) stream, as produced by the jars' PlatformZlibByteDecoder, and returns the inner format bytes.
func InflateZlibLimit ¶
InflateZlibLimit is InflateZlib with an optional decompressed-size limit. A non-positive limit disables the limit. The reader consumes at most one byte beyond the limit, so oversized compressed payloads are rejected before unbounded output is allocated.