Skip to content

Commit 28aa2a5

Browse files
committed
Document a bit of the decompressAllMembers behaviour
1 parent 9f40642 commit 28aa2a5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Codec/Compression/Zlib/Internal.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ defaultDecompressBufferSize = 32 * 1024 - L.chunkOverhead
171171
-- data chunks as output. The process is incremental, in that the demand for
172172
-- input and provision of output are interleaved.
173173
--
174+
-- To indicate the end of the input supply an empty input chunk. Note that
175+
-- for 'gzipFormat' with the default 'decompressAllMembers' @True@ you will
176+
-- have to do this, as the decompressor will look for any following members.
177+
-- With 'decompressAllMembers' @False@ the decompressor knows when the data
178+
-- ends and will produce 'DecompressStreamEnd' without you having to supply an
179+
-- empty chunk to indicate the end of the input.
180+
--
174181
data DecompressStream m =
175182

176183
DecompressInputRequired {

0 commit comments

Comments
 (0)