aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/zlib.erl
AgeCommit message (Collapse)Author
2016-07-23zlib: support extraction of inflation dictionaryGuilherme Andrade
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-19Merge branch 'essen/zlib-export-types'Zandra Hird
* essen/zlib-export-types: Export useful types from zlib module OTP-12584
2015-03-17Merge branch 'essen/zlib-windowbits'Zandra Hird
* essen/zlib-windowbits: Update zlib:zwindowbits/0 type to accept 8 and -8 OTP-12564
2015-03-03Update zlib:zwindowbits/0 type to accept 8 and -8Loïc Hoguin
Commit 7e8f5a776cbfa376e03369d058a90c8dd9f217fc (importing R11B-3) updated zlib, which had changed what values it accepts for window bits from 9-15 to 8-15. From deflate.c: - windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { return Z_STREAM_ERROR; } + if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ In inflate.c 8 was already an accepted value. This commit updates OTP to also accept the values 8 and -8.
2015-03-03Export useful types from zlib moduleLoïc Hoguin
2015-02-12Add zlib limited output buffer size functionalityСергей Прохоров
This functionality may be useful for compressed streams with high compression ratio (in case of gzip it may be up to x1000), when small amount of compressed data will produce large amount of uncompressed output. This may lead to DoS attacks, because server easily goes out of memory. Example of such high compression ratio stream: ``` dd if=/dev/zero of=sparse.bin bs=1MB count=100 # 100mb of zeroes gzip sparse.bin # 95kb sparse.bin.gz $ erl > {ok, Compressed} = file:read_file("sparse.bin.gz"), > 97082 = size(Compressed), > Uncompressed = zlib:gunzip(Compressed), > 100000000 = iolist_size(Uncompressed). ```
2014-01-16Add the 'rle' zstrategyBjörn Gustavsson
2013-08-29Merge branch 'maint'Fredrik Gustafsson
Conflicts: erts/preloaded/ebin/zlib.beam
2013-08-22Export type zlib:zstream/0Loïc Hoguin
Terms of this type are returned and sometimes sit in states. Exporting it allows us to properly track the types there.
2013-05-06Fix unmatched_returns warnings in STDLIB and KernelHans Bolinder
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-15Fix port leaks in zlibSverker Eriksson
zip,unzip,gzip,gunzip,compress and uncompress did not close the port when given invalid data argument. Fixed by putting close in "try-after". A closed port could in same cases get stuck in limbo due to data in io-queue. Fixed by adding a flush callback.
2011-09-02Update documentation and specifications of some of the zlib functionsHans Bolinder
The functions zlib:deflateSetDictionary/2 and zlib:inflateSetDictionary/2 accept iodata() as Dictionary. The functions zlib:crc32/2,3, zlib:adler32/2,3, zlib:compress/1, zlib:uncompress/1, zlib:zip/1, and zlib:unzip/1 accept iodata() as data.
2011-06-20Add more specs and typesHans Bolinder
An incorrect spec, rpc:yield/1, has been fixed.
2010-02-11Merge branch 'ks/erts' into ccase/r13b04_devErlang/OTP
* ks/erts: hipe_bif0.c: Remove $Id$ erts/preloaded: Add types and specs
2010-02-11erts/preloaded: Add types and specsKostis Sagonas
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP