v1.5.0
Welcome to the fifth minor release of sqsh-tools! This release again focuses on speed improvements and better reliability. We added FreeBSD to the test suite. Again thanks to the sqsh-rs project, libsqsh got some kinks worked out. Especially 32 bit support should now be more stable. Also libsqsh finally gained multithreading support. While being pretty basic, it already is able to increase the decompression speed for sqsh-unpack
.
sqsh-ls
sqsh-ls
does not only escape files if stdout
is a tty.
-R
,--raw
- Do not escape filenames, even if the output is a terminal.-e
,--escape
- Do escape filenames, even if the output is a not terminal.
sqsh-unpack
The unpack util now extracts files using multiple threads.
libsqsh
Version functions
libsqsh
now contains header macros and functions to determine the version that the binary is compiled against and actual current versions:
const char* sqsh_version(void)
Returns a string containing the library version, e.g.1.5.0
uint16_t sqsh_version_major(void)
Returns the major version of the current library version, e.g.1
uint16_t sqsh_version_minor(void)
Returns the minor version of the current library version, e.g.5
uint16_t sqsh_version_patch(void)
Returns the patch version of the current library version, e.g.0
Multithreading
While libsqsh
was threadsafe since ages, it didn't support any multithreaded functionality. With this version this finally has been implemented. The current implementation is pretty inefficient, but still faster than single core performance.
New Functions
-
struct SqshThreadpool* sqsh_threadpool_new(size_t, int*)
- creates a new threadpool -
int sqsh_threadpool_wait(struct SqshThreadpool*)
- waits until all tasks in the threadpool are done -
int sqsh_threadpool_free(struct SqshThreadpool*)
- frees a threadpool. Unfinished tasks are given an opportunity to finish, but no further tasks are being processed. It is advised to call_wait
before freeing the pool -
int sqsh_file_to_stream_mt(const SqshFile*, struct SqshThreadpool*, FILE*, sqsh_file_to_stream_mt_cb, void*)
- extracts a file to a given file stream. The stream must be randomly accessible, so it wont work for pipes. -
void sqsh_file_iterator_mt(const SqshFile*, struct SqshThreadpool*, sqsh_file_iterator_mt_cb, void*)
- creates astruct FileIterator
and callscb
for every iteration. -
bool sqsh_file_iterator_is_zero_block(const SqshFileIterator*)
- Returns true if the current iteration is a zero block.
Deprecated functions
time_t sqsh_easy_file_mtime()
has been replaced byuint32_t sqsh_easy_file_mtime2()
size_t sqsh_easy_file_size()
has been replaced byuint64_t sqsh_easy_file_size2()
int sqsh_export_table_resolve_inode()
has been replaced byint sqsh_export_table_resolve_inode2()
uint32_t sqsh_file_block_count()
has been replaced byuint64_t sqsh_file_block_count2()
int sqsh_file_iterator_skip()
has been replaced byint sqsh_file_iterator_skip2()
int sqsh_file_reader_advance()
has been replaced byint sqsh_file_reader_advance2()
size_t sqsh_mapper_size()
has been replaced byuint64_t sqsh_mapper_size2()
What's Changed
- common: add jq to docker container by @Gottox in #258
- test: make fuzzer-repro generator be a native target by @Gottox in #260
- utils: add functions to get the current version of the library by @Gottox in #261
- Chores/add usages by @Gottox in #263
- file: use the inode reference for the parent directory. by @Gottox in #262
- Improve/ls better escape by @Gottox in #259
- mapper: add a file mapper that freads file chunks by @Gottox in #144
- file: remove unkown file type by @Gottox in #264
- .Mk.yaml: use build modes by @Gottox in #265
- README.md: split readme by @Gottox in #266
- doc: fix doxygen by @Gottox in #267
- Update README.md by @Gottox in #268
- Doc updates for SqshTreeTraversal by @Dr-Emann in #269
- Allow max_depth=0 for SqshTreeTraversal by @Dr-Emann in #270
- Optimize
sqsh_tree_traversal_path_dup
by @Dr-Emann in #271 - chores: update cextras by @Gottox in #272
- easy/xattr: Return proper error code when malloc fails by @Gottox in #273
- Recycle stack items in SqshTreeTraversal on pop by @Dr-Emann in #274
- test: add doctest support by @Gottox in #275
- README.md: check result of archive_open. by @Gottox in #276
- file: sqsh__file_parent_inode_ref should be hidden by @Gottox in #277
- config: split .compression_lru_size for data and metablocks by @Gottox in #278
- examples: remove warnings when compiling with clang-17 by @Gottox in #279
- chores: fix 32bit build with -Wconversion by @Gottox in #281
- extract_view: remove field offset. Was never used. by @Gottox in #283
- Add/multithread read by @Gottox in #282
- unpack: use cextras for semaphore by @Gottox in #285
- README.md: mention sqsh-rs by @Gottox in #287
- README.md: add libsqsh link to sqsh-rs by @Gottox in #289
- Fix/sqsh config oob by @Gottox in #291
- mapper: Replace CxRcMap with CxRcRadixTree by @Gottox in #290
- Run FreeBSD tests on Cirrus CI by @Gottox in #292
- v1.5.0 by @Gottox in #288
Full Changelog: v1.4.0...v1.5.0