mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +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)`
15 lines
295 B
Plaintext
15 lines
295 B
Plaintext
// zig v0.10.0
|
|
// create a file filled with 0x00
|
|
const std = @import("std");
|
|
|
|
pub fn main() !void {
|
|
var b = [1]u8{0} ** 65535;
|
|
const f = try std.fs.cwd().createFile(
|
|
"huffman-null-max.in",
|
|
.{ .read = true },
|
|
);
|
|
defer f.close();
|
|
|
|
_ = try f.writeAll(b[0..]);
|
|
}
|