| ... | ... | @@ -601,7 +601,6 @@ pub fn decodeZStandardFrameAlloc(allocator: std.mem.Allocator, src: []const u8, |
| 601 | 601 | .literal_stream_index = undefined, |
| 602 | 602 | .huffman_tree = null, |
| 603 | 603 | }; |
| 604 | | var written_count: usize = 0; |
| 605 | 604 | while (true) : ({ |
| 606 | 605 | block_header = decodeBlockHeader(src[consumed_count..][0..3]); |
| 607 | 606 | consumed_count += 3; |
| ... | ... | @@ -623,7 +622,6 @@ pub fn decodeZStandardFrameAlloc(allocator: std.mem.Allocator, src: []const u8, |
| 623 | 622 | hash_state.update(written_slice.first); |
| 624 | 623 | hash_state.update(written_slice.second); |
| 625 | 624 | } |
| 626 | | written_count += written_size; |
| 627 | 625 | if (block_header.last_block) break; |
| 628 | 626 | } |
| 629 | 627 | return result.toOwnedSlice(); |
| ... | ... | @@ -637,6 +635,7 @@ pub fn decodeFrameBlocks(dest: []u8, src: []const u8, consumed_count: *usize, ha |
| 637 | 635 | |
| 638 | 636 | var block_header = decodeBlockHeader(src[0..3]); |
| 639 | 637 | var bytes_read: usize = 3; |
| 638 | defer consumed_count.* += bytes_read; |
| 640 | 639 | var decode_state = DecodeState{ |
| 641 | 640 | .repeat_offsets = .{ |
| 642 | 641 | types.compressed_block.start_repeated_offset_1, |
| ... | ... | @@ -676,7 +675,6 @@ pub fn decodeFrameBlocks(dest: []u8, src: []const u8, consumed_count: *usize, ha |
| 676 | 675 | written_count += written_size; |
| 677 | 676 | if (block_header.last_block) break; |
| 678 | 677 | } |
| 679 | | consumed_count.* += bytes_read; |
| 680 | 678 | return written_count; |
| 681 | 679 | } |
| 682 | 680 | |