Minor doc improvements
This commit is contained in:
parent
14a7be93a6
commit
e7a36b4a60
@ -34,10 +34,9 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/*! Stores a mutable string of 8-bit chars.
|
||||
/*! Stores a mutable string of chars.
|
||||
* For faster lookups, it knowns the length of its contents. Length must not
|
||||
* exceeds the maximum size(capacity).
|
||||
*/
|
||||
* exceeds the maximum size(capacity). */
|
||||
struct gmio_string
|
||||
{
|
||||
char* ptr; /*!< Contents */
|
||||
@ -103,9 +102,7 @@ char* gmio_cstr_copy(
|
||||
char* dst, size_t dst_capacity, const char* src, size_t src_len)
|
||||
{
|
||||
const size_t copy_len =
|
||||
dst_capacity > 0 ?
|
||||
GMIO_MIN(dst_capacity - 1, src_len) :
|
||||
0;
|
||||
dst_capacity > 0 ? GMIO_MIN(dst_capacity - 1, src_len) : 0;
|
||||
if (copy_len > 0) {
|
||||
strncpy(dst, src, copy_len);
|
||||
dst[copy_len] = '\0';
|
||||
|
@ -47,22 +47,20 @@ bool gmio_check_zlib_compress_options(
|
||||
int* error, const struct gmio_zlib_compress_options* z_opts);
|
||||
|
||||
/*! Decompresses the source buffer into the destination buffer.
|
||||
*
|
||||
* \p sourceLen is the byte length of the source buffer. Upon entry, \p destLen
|
||||
* \p src_len is the byte length of the source buffer. Upon entry, \p dest_len
|
||||
* is the total size of the destination buffer, which must be large enough to
|
||||
* hold the entire uncompressed data.
|
||||
* Upon exit, destLen is the actual size of the compressed buffer.
|
||||
*/
|
||||
* Upon exit, \p dest_len is the actual size of the compressed buffer. */
|
||||
int gmio_zlib_uncompress_buffer(
|
||||
uint8_t* dest, size_t* dest_len, const uint8_t* src, size_t src_len);
|
||||
|
||||
/*! Computes the CRC-32 value with the bytes buff[0..buff_len-1] */
|
||||
/*! Computes the CRC-32 value with the bytes from \p buff */
|
||||
uint32_t gmio_zlib_crc32(const uint8_t* buff, size_t buff_len);
|
||||
|
||||
/*! Returns the required initial value for the gmio_zlib_crc32_update() */
|
||||
/*! Returns the required initial value for gmio_zlib_crc32_update() */
|
||||
uint32_t gmio_zlib_crc32_initial();
|
||||
|
||||
/*! Updates a running CRC-32 with the bytes buff[0..buff_len-1] */
|
||||
/*! Updates a running CRC-32 with the bytes from \p buff */
|
||||
uint32_t gmio_zlib_crc32_update(
|
||||
uint32_t crc, const uint8_t* buff, size_t buff_len);
|
||||
|
||||
|
@ -62,21 +62,14 @@ enum gmio_zlib_compress_strategy
|
||||
*
|
||||
* Initialising gmio_zlib_compress_options with \c {0} (or \c {} in C++) is the
|
||||
* convenient way to set default values.
|
||||
*/
|
||||
*/
|
||||
struct gmio_zlib_compress_options
|
||||
{
|
||||
/*! Compression level
|
||||
*
|
||||
* \c 0 : default compression
|
||||
* \c 1 : best speed
|
||||
* \c 9 : best compression */
|
||||
/*! Compression level.
|
||||
* Use enum value from \c gmio_zlib_compress_level */
|
||||
uint8_t level;
|
||||
|
||||
/*! Compression strategy
|
||||
*
|
||||
* \c 0 : default strategy
|
||||
* \c 1 : filtered
|
||||
* \c 9 : best compression */
|
||||
/*! Compression strategy */
|
||||
enum gmio_zlib_compress_strategy strategy;
|
||||
|
||||
/*! Specifies how much memory should be allocated for the internal
|
||||
@ -86,8 +79,7 @@ struct gmio_zlib_compress_options
|
||||
* default usage.
|
||||
*
|
||||
* \c 1 uses minimum memory but is slow and reduces compression ratio
|
||||
* \c 9 uses maximum memory for optimal speed
|
||||
*/
|
||||
* \c 9 uses maximum memory for optimal speed */
|
||||
uint8_t memory_usage;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user