Skip to content

Commit f415501

Browse files
committed
compress: add a deflate compressor
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)`
1 parent 5a7c557 commit f415501

File tree

73 files changed

+7471
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+7471
-751
lines changed

build.zig

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,25 @@ pub fn build(b: *Builder) !void {
9393
.install_dir = .lib,
9494
.install_subdir = "zig",
9595
.exclude_extensions = &[_][]const u8{
96-
"README.md",
96+
// exclude files from lib/std/compress/
97+
".gz",
9798
".z.0",
9899
".z.9",
99-
".gz",
100100
"rfc1951.txt",
101+
"rfc1952.txt",
102+
// exclude files from lib/std/compress/deflate/testdata
103+
".expect",
104+
".expect-noinput",
105+
".golden",
106+
".input",
107+
"compress-e.txt",
108+
"compress-gettysburg.txt",
109+
"compress-pi.txt",
110+
"rfc1951.txt",
111+
// exclude files from lib/std/tz/
101112
".tzif",
113+
// others
114+
"README.md",
102115
},
103116
.blank_extensions = &[_][]const u8{
104117
"test.zig",

lib/std/compress.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pub const gzip = @import("compress/gzip.zig");
55
pub const zlib = @import("compress/zlib.zig");
66

77
test {
8+
_ = deflate;
89
_ = gzip;
910
_ = zlib;
1011
}

0 commit comments

Comments
 (0)