@@ -709,8 +709,8 @@ fromCompressionLevel (CompressionLevel n)
709
709
-- usage.
710
710
--
711
711
-- The compression window size is the value of the the window bits raised to
712
- -- the power 2. The window bits must be in the range @8 ..15@ which corresponds
713
- -- to compression window sizes of 256b to 32Kb. The default is 15 which is also
712
+ -- the power 2. The window bits must be in the range @9 ..15@ which corresponds
713
+ -- to compression window sizes of 512b to 32Kb. The default is 15 which is also
714
714
-- the maximum size.
715
715
--
716
716
-- The total amount of memory used depends on the window bits and the
@@ -737,19 +737,19 @@ data WindowBits = WindowBits Int
737
737
defaultWindowBits :: WindowBits
738
738
defaultWindowBits = WindowBits 15
739
739
740
- -- | A specific compression window size, specified in bits in the range @8 ..15@
740
+ -- | A specific compression window size, specified in bits in the range @9 ..15@
741
741
--
742
742
windowBits :: Int -> WindowBits
743
743
windowBits n
744
- | n >= 8 && n <= 15 = WindowBits n
745
- | otherwise = error " WindowBits must be in the range 8 ..15"
744
+ | n >= 9 && n <= 15 = WindowBits n
745
+ | otherwise = error " WindowBits must be in the range 9 ..15"
746
746
747
747
fromWindowBits :: Format -> WindowBits -> CInt
748
748
fromWindowBits format bits = (formatModifier format) (checkWindowBits bits)
749
749
where checkWindowBits DefaultWindowBits = 15
750
750
checkWindowBits (WindowBits n)
751
- | n >= 8 && n <= 15 = fromIntegral n
752
- | otherwise = error " WindowBits must be in the range 8 ..15"
751
+ | n >= 9 && n <= 15 = fromIntegral n
752
+ | otherwise = error " WindowBits must be in the range 9 ..15"
753
753
formatModifier Zlib = id
754
754
formatModifier GZip = (+ 16 )
755
755
formatModifier GZipOrZlib = (+ 32 )
0 commit comments