pysapcompress library¶
Library implementing SAP’s LZH and LZC compression algorithms.
-
exception
pysapcompress.
CompressError
¶
-
exception
pysapcompress.
DecompressError
¶
-
pysapcompress.
compress
()¶ Compress a buffer using SAP’s compression algorithms.
Parameters: - in (str) – input buffer to compress
- algorithm (int) – algorithm to use
Returns: tuple with return code, output length and output buffer
Return type: tuple of int, int, string
Raises: CompressError – if an error occurred during compression
-
pysapcompress.
decompress
()¶ Decompress a buffer using SAP’s compression algorithms.
Parameters: - in (str) – input buffer to decompress
- out_length (int) – length of the output to decompress
Returns: tuple of return code, output length and output buffer
Return type: tuple of int, int, string
Raises: DecompressError – if an error occurred during decompression