| ... | @@ -1325,9 +1325,9 @@ fn inflate_decompress(in: []const u8, out: *std.ArrayListUnmanaged(u8), allocato | ... | @@ -1325,9 +1325,9 @@ fn inflate_decompress(in: []const u8, out: *std.ArrayListUnmanaged(u8), allocato |
| 1325 | std.debug.assert(ret != .Z_STREAM_ERROR); | 1325 | std.debug.assert(ret != .Z_STREAM_ERROR); |
| 1326 | std.debug.assert(ret == .Z_OK); | 1326 | std.debug.assert(ret == .Z_OK); |
| 1327 | } | 1327 | } |
| | 1328 | // std.log.debug("inflate_decompress: -> {*} {d}", .{ in.ptr, in.len }); |
| 1328 | strm.next_in = @constCast(in.ptr); | 1329 | strm.next_in = @constCast(in.ptr); |
| 1329 | strm.avail_in = @intCast(in.len); | 1330 | strm.avail_in = @truncate(in.len); |
| 1330 | // std.log.debug("inflate_decompress: -> {*} {d}", .{ strm.next_in, strm.avail_in }); | | |
| 1331 | | 1331 | |
| 1332 | while (true) { | 1332 | while (true) { |
| 1333 | var buf: [16384]u8 = @splat(0); | 1333 | var buf: [16384]u8 = @splat(0); |
| ... | @@ -1337,7 +1337,6 @@ fn inflate_decompress(in: []const u8, out: *std.ArrayListUnmanaged(u8), allocato | ... | @@ -1337,7 +1337,6 @@ fn inflate_decompress(in: []const u8, out: *std.ArrayListUnmanaged(u8), allocato |
| 1337 | const ret: ZlibCode = @enumFromInt(z.inflate(&strm, z.Z_SYNC_FLUSH)); | 1337 | const ret: ZlibCode = @enumFromInt(z.inflate(&strm, z.Z_SYNC_FLUSH)); |
| 1338 | // std.log.debug("inflate_decompress: <- {*} {*} {d} {d} {s}", .{ strm.next_in, strm.next_out, strm.avail_in, strm.avail_out, @tagName(ret) }); | 1338 | // std.log.debug("inflate_decompress: <- {*} {*} {d} {d} {s}", .{ strm.next_in, strm.next_out, strm.avail_in, strm.avail_out, @tagName(ret) }); |
| 1339 | std.debug.assert(ret != .Z_STREAM_ERROR); | 1339 | std.debug.assert(ret != .Z_STREAM_ERROR); |
| 1340 | // if (ret == .Z_BUF_ERROR) std.log.err("{s}", .{strm.msg}); | | |
| 1341 | std.debug.assert(ret != .Z_BUF_ERROR); | 1340 | std.debug.assert(ret != .Z_BUF_ERROR); |
| 1342 | if (ret == .Z_MEM_ERROR) return error.OutOfMemory; | 1341 | if (ret == .Z_MEM_ERROR) return error.OutOfMemory; |
| 1343 | if (ret == .Z_DATA_ERROR) return error.Z_DATA_ERROR; | 1342 | if (ret == .Z_DATA_ERROR) return error.Z_DATA_ERROR; |