struct huffman [src]
Creates huffman only deflate blocks. Disables Lempel-Ziv match searching and
only performs Huffman entropy encoding. Results in faster compression, much
less memory requirements during compression but bigger compressed sizes.
Members
- compress (Function)
- compressor (Function)
- Compressor (Type Function)
Source
pub const huffman = struct {
pub fn compress(comptime container: Container, reader: anytype, writer: anytype) !void {
var c = try huffman.compressor(container, writer);
try c.compress(reader);
try c.finish();
}
pub fn Compressor(comptime container: Container, comptime WriterType: type) type {
return SimpleCompressor(.huffman, container, WriterType);
}
pub fn compressor(comptime container: Container, writer: anytype) !huffman.Compressor(container, @TypeOf(writer)) {
return try huffman.Compressor(container, @TypeOf(writer)).init(writer);
}
}