Compression functions.
More...
|
|
std::string | compress_lz4 (const std::string &str, int32_t level) |
| |
|
std::string | compress_zstd (const std::string &str, int32_t level) |
| |
| std::string | compress (const std::string &str) |
| | Compress a string in memory. More...
|
| |
| std::string | decompress (const std::string &str) |
| | Decompress a string in memory. More...
|
| |
| void | compress_file (const std::string &from_path, const std::string &to_path) |
| | Compress a file. More...
|
| |
| void | decompress_file (const std::string &from_path, const std::string &to_path) |
| | Decompress a file. More...
|
| |
◆ compress()
| std::string bcache::comp::compress |
( |
const std::string & |
str | ) |
|
Compress a string in memory.
- Parameters
-
| str | The string to compress. |
- Returns
- the compressed string.
◆ compress_file()
| void bcache::comp::compress_file |
( |
const std::string & |
from_path, |
|
|
const std::string & |
to_path |
|
) |
| |
Compress a file.
- Parameters
-
| from_path | The source file (uncompressed). |
| to_path | The destination file (compressed). |
- Exceptions
-
| runtime_error | if the operation could not be completed. |
◆ decompress()
| std::string bcache::comp::decompress |
( |
const std::string & |
str | ) |
|
Decompress a string in memory.
- Parameters
-
| str | The compressed string to decompress. |
- Returns
- the original (decompressed) string.
◆ decompress_file()
| void bcache::comp::decompress_file |
( |
const std::string & |
from_path, |
|
|
const std::string & |
to_path |
|
) |
| |
Decompress a file.
- Parameters
-
| from_path | The source file (compressed). |
| to_path | The destination file (uncompressed). |
- Exceptions
-
| runtime_error | if the operation could not be completed. |