From f06a6f75ed02e0780d65d22498926af2eafc947a Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 31 Aug 2011 09:26:43 +0200 Subject: Update documentation and specifications of some of the zlib functions 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. --- erts/doc/src/zlib.xml | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 47a649af02..8917ab5c3a 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -378,31 +378,31 @@ unpack(Z, Compressed, Dict) -> Calculate CRC -

Calculate the CRC checksum for Binary.

+

Calculate the CRC checksum for Data.

Calculate CRC -

Update a running CRC checksum for Binary. - If Binary is the empty binary, this function returns +

Update a running CRC checksum for Data. + If Data is the empty binary or the empty iolist, this function returns the required initial value for the crc.

-Crc = lists:foldl(fun(Bin,Crc0) ->  
-                      zlib:crc32(Z, Crc0, Bin),
-                  end, zlib:crc32(Z,<< >>), Bins)
+Crc = lists:foldl(fun(Data,Crc0) -> + zlib:crc32(Z, Crc0, Data), + end, zlib:crc32(Z,<< >>), Datas)
Combine two CRC's -

Combine two CRC checksums into one. For two binaries, - Bin1 and Bin2 with sizes of Size1 and +

Combine two CRC checksums into one. For two binaries or iolists, + Data1 and Data2 with sizes of Size1 and Size2, with CRC checksums CRC1 and CRC2. crc32_combine/4 returns the CRC - checksum of <<Bin1/binary,Bin2/binary>>, requiring + checksum of [Data1,Data2], requiring only CRC1, CRC2, and Size2.

@@ -411,75 +411,75 @@ Crc = lists:foldl(fun(Bin,Crc0) -> Calculate the adler checksum -

Calculate the Adler-32 checksum for Binary.

+

Calculate the Adler-32 checksum for Data.

Calculate the adler checksum -

Update a running Adler-32 checksum for Binary. - If Binary is the empty binary, this function returns +

Update a running Adler-32 checksum for Data. + If Data is the empty binary or the empty iolist, this function returns the required initial value for the checksum.

-Crc = lists:foldl(fun(Bin,Crc0) ->  
-                      zlib:adler32(Z, Crc0, Bin),
-                  end, zlib:adler32(Z,<< >>), Bins)
+Crc = lists:foldl(fun(Data,Crc0) -> + zlib:adler32(Z, Crc0, Data), + end, zlib:adler32(Z,<< >>), Datas)
Combine two Adler-32 checksums -

Combine two Adler-32 checksums into one. For two binaries, - Bin1 and Bin2 with sizes of Size1 and +

Combine two Adler-32 checksums into one. For two binaries or iolists, + Data1 and Data2 with sizes of Size1 and Size2, with Adler-32 checksums Adler1 and Adler2. adler32_combine/4 returns the Adler - checksum of <<Bin1/binary,Bin2/binary>>, requiring + checksum of [Data1,Data2], requiring only Adler1, Adler2, and Size2.

- Compress a binary with standard zlib functionality + Compress data with standard zlib functionality -

Compress a binary (with zlib headers and checksum).

+

Compress data (with zlib headers and checksum).

- Uncompress a binary with standard zlib functionality + Uncompress data with standard zlib functionality -

Uncompress a binary (with zlib headers and checksum).

+

Uncompress data (with zlib headers and checksum).

- Compress a binary without the zlib headers + Compress data without the zlib headers -

Compress a binary (without zlib headers and checksum).

+

Compress data (without zlib headers and checksum).

- Uncompress a binary without the zlib headers + Uncompress data without the zlib headers -

Uncompress a binary (without zlib headers and checksum).

+

Uncompress data (without zlib headers and checksum).

- Compress a binary with gz header + Compress data with gz header -

Compress a binary (with gz headers and checksum).

+

Compress data (with gz headers and checksum).

- Uncompress a binary with gz header + Uncompress data with gz header -

Uncompress a binary (with gz headers and checksum).

+

Uncompress data (with gz headers and checksum).

-- cgit v1.2.3