| ... | @@ -151,8 +151,7 @@ fn readInFrame(d: *Decompress, w: *Writer, limit: Limit, state: *State.InFrame) | ... | @@ -151,8 +151,7 @@ fn readInFrame(d: *Decompress, w: *Writer, limit: Limit, state: *State.InFrame) |
| 151 | const in = d.input; | 151 | const in = d.input; |
| 152 | const window_len = d.window_len; | 152 | const window_len = d.window_len; |
| 153 | | 153 | |
| 154 | const header_bytes = try in.takeArray(3); | 154 | const block_header = try in.takeStruct(Frame.Zstandard.Block.Header, .little); |
| 155 | const block_header: Frame.Zstandard.Block.Header = @bitCast(header_bytes.*); | | |
| 156 | const block_size = block_header.size; | 155 | const block_size = block_header.size; |
| 157 | const frame_block_size_max = state.frame.block_size_max; | 156 | const frame_block_size_max = state.frame.block_size_max; |
| 158 | if (frame_block_size_max < block_size) return error.BlockOversize; | 157 | if (frame_block_size_max < block_size) return error.BlockOversize; |