From e19c8398c1946bd4616c3fa1c095149462346d15 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 21 Feb 2022 17:16:13 +0100 Subject: Merging upstream version 1.13. Signed-off-by: Daniel Baumann --- bbexample.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'bbexample.c') diff --git a/bbexample.c b/bbexample.c index 96257ee..074f7ae 100644 --- a/bbexample.c +++ b/bbexample.c @@ -1,5 +1,5 @@ /* Buffer to buffer example - Test program for the library lzlib - Copyright (C) 2010-2021 Antonio Diaz Diaz. + Copyright (C) 2010-2022 Antonio Diaz Diaz. This program is free software: you have unlimited permission to copy, distribute, and modify it. @@ -28,9 +28,9 @@ #endif -/* Returns the address of a malloc'd buffer containing the file data and +/* Return the address of a malloc'd buffer containing the file data and the file size in '*file_sizep'. - In case of error, returns 0 and does not modify '*file_sizep'. + In case of error, return 0 and do not modify '*file_sizep'. */ uint8_t * read_file( const char * const name, long * const file_sizep ) { @@ -73,10 +73,10 @@ uint8_t * read_file( const char * const name, long * const file_sizep ) } -/* Compresses 'insize' bytes from 'inbuf'. - Returns the address of a malloc'd buffer containing the compressed data, +/* Compress 'insize' bytes from 'inbuf'. + Return the address of a malloc'd buffer containing the compressed data, and the size of the data in '*outlenp'. - In case of error, returns 0 and does not modify '*outlenp'. + In case of error, return 0 and do not modify '*outlenp'. */ uint8_t * bbcompressl( const uint8_t * const inbuf, const long insize, const int level, long * const outlenp ) @@ -152,10 +152,10 @@ uint8_t * bbcompressl( const uint8_t * const inbuf, const long insize, } -/* Decompresses 'insize' bytes from 'inbuf'. - Returns the address of a malloc'd buffer containing the decompressed +/* Decompress 'insize' bytes from 'inbuf'. + Return the address of a malloc'd buffer containing the decompressed data, and the size of the data in '*outlenp'. - In case of error, returns 0 and does not modify '*outlenp'. + In case of error, return 0 and do not modify '*outlenp'. */ uint8_t * bbdecompressl( const uint8_t * const inbuf, const long insize, long * const outlenp ) @@ -230,10 +230,10 @@ int full_test( const uint8_t * const inbuf, const long insize ) } -/* Compresses 'insize' bytes from 'inbuf' to 'outbuf'. - Returns the size of the compressed data in '*outlenp'. - In case of error, or if 'outsize' is too small, returns false and does - not modify '*outlenp'. +/* Compress 'insize' bytes from 'inbuf' to 'outbuf'. + Return the size of the compressed data in '*outlenp'. + In case of error, or if 'outsize' is too small, return false and do not + modify '*outlenp'. */ bool bbcompress( const uint8_t * const inbuf, const int insize, const int dictionary_size, const int match_len_limit, @@ -267,10 +267,10 @@ bool bbcompress( const uint8_t * const inbuf, const int insize, } -/* Decompresses 'insize' bytes from 'inbuf' to 'outbuf'. - Returns the size of the decompressed data in '*outlenp'. - In case of error, or if 'outsize' is too small, returns false and does - not modify '*outlenp'. +/* Decompress 'insize' bytes from 'inbuf' to 'outbuf'. + Return the size of the decompressed data in '*outlenp'. + In case of error, or if 'outsize' is too small, return false and do not + modify '*outlenp'. */ bool bbdecompress( const uint8_t * const inbuf, const int insize, uint8_t * const outbuf, const int outsize, -- cgit v1.2.3