|  | 
const std = @import("std.zig");
 | 
| deflatecompress/deflate.zig | 
pub const deflate = @import("compress/deflate.zig");
 | 
| gzipcompress/gzip.zig | 
pub const gzip = @import("compress/gzip.zig");
 | 
| lzmacompress/lzma.zig | 
pub const lzma = @import("compress/lzma.zig");
 | 
| lzma2compress/lzma2.zig | 
pub const lzma2 = @import("compress/lzma2.zig");
 | 
| xzcompress/xz.zig | 
pub const xz = @import("compress/xz.zig");
 | 
| zlibcompress/zlib.zig | 
pub const zlib = @import("compress/zlib.zig");
 | 
| zstdcompress/zstandard.zig | 
pub const zstd = @import("compress/zstandard.zig");
 | 
| HashedReader() | 
pub fn HashedReader(
    comptime ReaderType: anytype,
    comptime HasherType: anytype,
) type {
    return struct {
        child_reader: ReaderType,
        hasher: HasherType,
        pub const Error = ReaderType.Error;
        pub const Reader = std.io.Reader(*@This(), Error, read);
 | 
| read() | 
        pub fn read(self: *@This(), buf: []u8) Error!usize {
            const amt = try self.child_reader.read(buf);
            self.hasher.update(buf);
            return amt;
        }
 | 
| reader() | 
        pub fn reader(self: *@This()) Reader {
            return .{ .context = self };
        }
    };
}
 | 
| hashedReader() | 
pub fn hashedReader(
    reader: anytype,
    hasher: anytype,
) HashedReader(@TypeOf(reader), @TypeOf(hasher)) {
    return .{ .child_reader = reader, .hasher = hasher };
}
test {
    _ = deflate;
    _ = gzip;
    _ = lzma;
    _ = lzma2;
    _ = xz;
    _ = zlib;
    _ = zstd;
}
 | 
|  |