Type Function Decompressor [src]

Prototype

pub fn Decompressor(comptime container: Container, comptime ReaderType: type) type

Parameters

container: ContainerReaderType: type

Source

pub fn Decompressor(comptime container: Container, comptime ReaderType: type) type { // zlib has 4 bytes footer, lookahead of 4 bytes ensures that we will not overshoot. // gzip has 8 bytes footer so we will not overshoot even with 8 bytes of lookahead. // For raw deflate there is always possibility of overshot so we use 8 bytes lookahead. const lookahead: type = if (container == .zlib) u32 else u64; return Inflate(container, lookahead, ReaderType); }