This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
The input source file is invalid.
Description
This error code is reported when the source file passed in the compressFile() or decompressFile() API is invalid.
Possible Causes
When the compressFile() API is called, the file to compress does not exist. When the decompressFile() API is called, the file to decompress does not exist.
Solution
Error Message
The input destination file is invalid.
Description
This error code is reported when the destination file passed in the compressFile() or decompressFile() API is invalid.
Possible Causes
Solution
Error Message
The input source file is not in ZIP format or is damaged.
Description
This error code is reported when the format of the source file is incorrect or the source file is damaged when the decompressFile API is called.
Possible Causes
Solution
Error Message
No such file or access mode error.
Description
This error code is reported when the input file path, file descriptor, or file access mode is incorrect when the gzopen or gzdopen API is called.
Possible Causes
Solution
Error Message
Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure.
Description
This error code is reported when an error occurs in compression or decompression stream when the deflate or inflate API is called.
Possible Causes
Solution
Error Message
The input data is incorrect. For example, the data does not conform to the zlib compression format, the compressed data is corrupted, or the data is not compressed.
Description
This error code is reported when the input data is incorrect when the uncompress or uncompress2 API is called.
Possible Causes
When the uncompress or uncompress2 API is called, the compress API is not used for compression.
Solution
Use the compress API to compress the file before using the uncompress2 or uncompress API to decompress the file.
Error Message
Memory allocation failed.
Description
This error code is reported when the memory allocation fails when the gzclose or gzclosew API is called.
Possible Causes
The gzsetparams API is called before calling the gzclose or gzclosew API. As a result, an incorrect compression level or compression strategy is passed in.
Solution
Check whether the gzsetparams API is called and pass in the correct compression level and compression strategy.
Error Message
The input buffer is incorrect, and the output buffer is too small to accommodate the compressed or decompressed data.
Description
This error code is reported when the input buffer is incorrect when the compress, compress2, uncompress, or uncompress2 API is called.
Possible Causes
Solution
Increase the size of the corresponding buffer.
Error Message
Internal structure error.
Description
This error code is reported when the input parameter is incorrect when the gzputc, gzwrite, or gzread API is called, or when the input file access mode is incorrect when the API for opening the .gz file is called.
Possible Causes
Solution