@@ -48,7 +48,7 @@ finishStream iter stream outbuff acc = do
4848 c_set_avail_out stream outbuff $ fromIntegral chunkSize
4949 status <- c_call_deflate_finish stream
5050 newAvail <- fromIntegral `fmap` c_get_avail_out stream
51− bs <- packCStringLen (outbuff, chunkSize - newAvail)
51+ bs <- unsafePackCStringLen (outbuff, chunkSize - newAvail)
5252 eacc <- iter acc bs
5353 if status == 0 || newAvail == 0
5454 then case eacc of
@@ -71,7 +71,7 @@ compressIter iter stream outbuff accInit bsInput = do
7171 c_set_avail_out stream outbuff $ fromIntegral chunkSize
7272 c_call_deflate_noflush stream
7373 newAvail <- fromIntegral `fmap` c_get_avail_out stream
74− bs <- packCStringLen (outbuff, chunkSize - newAvail)
74+ bs <- unsafePackCStringLen (outbuff, chunkSize - newAvail)
7575 eacc <- iter acc bs
7676 if newAvail == 0
7777 then case eacc of