From a74c6421494263524283c24db147b92a379bd2fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Anic=CC=81?= Date: Tue, 6 Feb 2024 21:34:04 +0100 Subject: [PATCH] test deflate allocation --- src/deflate.zig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/deflate.zig b/src/deflate.zig index 5c16e3a..49bbfc2 100644 --- a/src/deflate.zig +++ b/src/deflate.zig @@ -482,12 +482,11 @@ test "check struct sizes" { const hbw_size = 11472; // 11.2k try expect(@sizeOf(Bw) == hbw_size); - //const D = Deflate(Hbw); - // 404744, 395.26k + const D = Deflate(.raw, @TypeOf(io.null_writer), Bw); + // 404744, 395.26K // ?Token: 6, ?u8: 2, level: 8 - //try expect(@sizeOf(D) == tokens_size + lookup_size + window_size + hbw_size + 6 + 2 + 8); - - //print("Delfate size: {d} {d}\n", .{ @sizeOf(D), @sizeOf(LevelArgs) }); + try expect(@sizeOf(D) == tokens_size + lookup_size + window_size + hbw_size + 24); + //print("Delfate size: {d} {d}\n", .{ @sizeOf(D), tokens_size + lookup_size + hbw_size + window_size }); // current std lib deflate allocation: // 797_901, 779.2k