Skip to content

Commit 01192bf

Browse files
committed
Move and adjust a comment to keep it relevant
1 parent e668dbd commit 01192bf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Codec/Compression/Zlib/Internal.hs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,9 @@ decompressStream format (DecompressParams bits initChunkSize mdict) =
624624
else do fillBuffers defaultDecompressBufferSize
625625

626626
Stream.StreamEnd -> do
627-
-- The decompressor tells us we're done, but that doesn't mean we have
628-
-- consumed all the input, so we return any trailing data.
627+
-- The decompressor tells us we're done.
628+
-- Note that there may be input bytes still available if the stream is
629+
-- embeded in some other data stream, so we return any trailing data.
629630
inputBufferEmpty <- Stream.inputBufferEmpty
630631
if inputBufferEmpty
631632
then do finish (DecompressStreamEnd S.empty)
@@ -646,9 +647,6 @@ decompressStream format (DecompressParams bits initChunkSize mdict) =
646647
-- Note even if we end with an error we still try to flush the last chunk if
647648
-- there is one. The user just has to decide what they want to trust.
648649
finish end = do
649-
-- Note that there may be input bytes still available if the stream
650-
-- is embeded in some other data stream. Here we just silently discard
651-
-- any trailing data.
652650
outputBufferBytesAvailable <- Stream.outputBufferBytesAvailable
653651
if outputBufferBytesAvailable > 0
654652
then do (outFPtr, offset, length) <- Stream.popOutputBuffer

0 commit comments

Comments
 (0)