[][src]Module lz_fear::framed

The LZ4 frame format.

An lz4-compressed file typically consists of a single frame.

The frame format is self-terminating, i.e. it can be embedded without a length prefix. This also allows LZ4 frames to be concatenated back to back.

See CompressionSettings for the features and flexibility that the format offers.

Structs

CompressionSettings

A builder-style struct that configures compression settings. This is how you compress LZ4 frames. (An LZ4 file usually consists of a single frame.)

LZ4FrameIoReader

Wrapper around LZ4FrameReader that implements Read and BufRead.

LZ4FrameReader

Read an LZ4-compressed frame.

Enums

CompressionError

Errors when compressing an LZ4 frame.

DecompressionError

Errors when decompressing an LZ4 frame.

Constants

MAGIC

The four magic bytes at the start of every LZ4 frame (little endian).

WINDOW_SIZE

The LZ4 raw format maintains a lookback window of exactly 64KiB.

Functions

decompress_frame

Convenience wrapper around LZ4FrameReader that reads everything into a vector and returns it.