|
Document of c-modernization-kit (porter) 1.0.0
|
Linux 向け圧縮・解凍モジュール (zlib)。 More...
Go to the source code of this file.
Functions | |
| int | potr_compress (uint8_t *dst, size_t *dst_len, const uint8_t *src, size_t src_len) |
| データを圧縮します。 | |
| int | potr_decompress (uint8_t *dst, size_t *dst_len, const uint8_t *src, size_t src_len) |
| 圧縮データを解凍します。 | |
Linux 向け圧縮・解凍モジュール (zlib)。
zlib の deflate/inflate を raw DEFLATE (windowBits = -15) モードで使用します。
Windows 実装 (MSZIP | COMPRESS_RAW) と同一フォーマットを出力するため、 クロスプラットフォーム通信に対応します。
Definition in file compress_linux.c.
| int potr_compress | ( | uint8_t * | dst, |
| size_t * | dst_len, | ||
| const uint8_t * | src, | ||
| size_t | src_len ) |
データを圧縮します。
| [out] | dst | 圧縮後データを格納するバッファ。 先頭 4 バイトに元サイズ (NBO) が書き込まれます。 |
| [in,out] | dst_len | 入力: dst のバッファサイズ。 出力: 書き込んだバイト数。 |
| [in] | src | 圧縮前データへのポインタ。 |
| [in] | src_len | 圧縮前データのバイト数。 |
Definition at line 29 of file compress_linux.c.
References POTR_COMPRESS_HEADER_SIZE.
Referenced by potrSend().
| int potr_decompress | ( | uint8_t * | dst, |
| size_t * | dst_len, | ||
| const uint8_t * | src, | ||
| size_t | src_len ) |
圧縮データを解凍します。
| [out] | dst | 解凍後データを格納するバッファ。 |
| [in,out] | dst_len | 入力: dst のバッファサイズ。 出力: 書き込んだバイト数。 |
| [in] | src | 圧縮後データへのポインタ (先頭 4 バイトは元サイズ)。 |
| [in] | src_len | 圧縮後データのバイト数 (ヘッダーを含む)。 |
Definition at line 74 of file compress_linux.c.
References POTR_COMPRESS_HEADER_SIZE.
Referenced by n1_recv_deliver(), and recv_deliver().