const deflate = @import("flate/deflate.zig");
const inflate = @import("flate/inflate.zig");
pub fn decompress(reader: anytype, writer: anytype) !void {
try inflate.decompress(.gzip, reader, writer);
}
pub fn Decompressor(comptime ReaderType: type) type {
return inflate.Decompressor(.gzip, ReaderType);
}
pub fn decompressor(reader: anytype) Decompressor(@TypeOf(reader)) {
return inflate.decompressor(.gzip, reader);
}
pub const Options = deflate.Options;
pub fn compress(reader: anytype, writer: anytype, options: Options) !void {
try deflate.compress(.gzip, reader, writer, options);
}
pub fn Compressor(comptime WriterType: type) type {
return deflate.Compressor(.gzip, WriterType);
}
pub fn compressor(writer: anytype, options: Options) !Compressor(@TypeOf(writer)) {
return try deflate.compressor(.gzip, writer, options);
}
pub const huffman = struct {
pub fn compress(reader: anytype, writer: anytype) !void {
try deflate.huffman.compress(.gzip, reader, writer);
}
pub fn Compressor(comptime WriterType: type) type {
return deflate.huffman.Compressor(.gzip, WriterType);
}
pub fn compressor(writer: anytype) !huffman.Compressor(@TypeOf(writer)) {
return deflate.huffman.compressor(.gzip, writer);
}
};
pub const store = struct {
pub fn compress(reader: anytype, writer: anytype) !void {
try deflate.store.compress(.gzip, reader, writer);
}
pub fn Compressor(comptime WriterType: type) type {
return deflate.store.Compressor(.gzip, WriterType);
}
pub fn compressor(writer: anytype) !store.Compressor(@TypeOf(writer)) {
return deflate.store.compressor(.gzip, writer);
}
};