mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 22:33:08 +00:00
Replaces the inflate API from `inflateStream(reader: anytype, window_slice: []u8)` to `decompressor(allocator: mem.Allocator, reader: anytype, dictionary: ?[]const u8)` and `compressor(allocator: mem.Allocator, writer: anytype, options: CompressorOptions)`
30 lines
964 B
Zig
30 lines
964 B
Zig
//! The deflate package is a translation of the Go code of the compress/flate package from
|
|
//! https://go.googlesource.com/go/+/refs/tags/go1.17/src/compress/flate/
|
|
|
|
const deflate = @import("deflate/compressor.zig");
|
|
const inflate = @import("deflate/decompressor.zig");
|
|
|
|
pub const Compression = deflate.Compression;
|
|
pub const Compressor = deflate.Compressor;
|
|
pub const Decompressor = inflate.Decompressor;
|
|
|
|
pub const compressor = deflate.compressor;
|
|
pub const decompressor = inflate.decompressor;
|
|
|
|
test {
|
|
_ = @import("deflate/token.zig");
|
|
_ = @import("deflate/bits_utils.zig");
|
|
_ = @import("deflate/dict_decoder.zig");
|
|
|
|
_ = @import("deflate/huffman_code.zig");
|
|
_ = @import("deflate/huffman_bit_writer.zig");
|
|
|
|
_ = @import("deflate/compressor.zig");
|
|
_ = @import("deflate/compressor_test.zig");
|
|
|
|
_ = @import("deflate/deflate_fast.zig");
|
|
_ = @import("deflate/deflate_fast_test.zig");
|
|
|
|
_ = @import("deflate/decompressor.zig");
|
|
}
|