@@ -64,8 +64,8 @@ pub struct InflateState {
64
64
/* sliding window */
65
65
wbits : u32 , /* log base 2 of requested window size */
66
66
wsize : u32 , /* window size or zero if not using window */
67
- whave : u32 , /* valid bytes in the window */
68
- wnext : u32 , /* window write index */
67
+ whave : isize , /* valid bytes in the window */
68
+ wnext : isize , /* window write index */
69
69
window : [WINDOW_SIZE ]u8 ,/* sliding window , if needed */
70
70
/* bit accumulator */
71
71
hold : u32 , /* input bit accumulator */
@@ -977,9 +977,11 @@ pub fn inflate(strm: &z_stream, flush: FlushMode) -> %void {
977
977
state .check = UPDATE (state .check , strm .next_out - out , out );
978
978
strm .adler = state .check ;
979
979
}
980
- strm .data_type = state .bits + (if (state .last ) 64 else 0 ) +
981
- (if (state .mode == inflate_mode .TYPE ) 128 else 0 ) +
982
- (if (state .mode == inflate_mode .LEN_ || state .mode == inflate_mode .COPY_ ) 256 else 0 );
980
+ // TODO: https://github.com/andrewrk/zig/issues/136
981
+ // strm.data_type = state.bits +
982
+ // (if (state.last) 64 else 0) +
983
+ // (if (state.mode == inflate_mode.TYPE) 128 else 0) +
984
+ // (if (state.mode == inflate_mode.LEN_ || state.mode == inflate_mode.COPY_) 256 else 0);
983
985
if (((in == 0 && out == 0 ) || flush == FlushMode .Z_FINISH ) && ret == Z_OK )
984
986
ret = Z_BUF_ERROR ;
985
987
return ret ;
0 commit comments