Skip to content

v1.5.0

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Aug 18:56
· 11 commits to main since this release

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 a struct FileIterator and calls cb 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 by uint32_t sqsh_easy_file_mtime2()
  • size_t sqsh_easy_file_size() has been replaced by uint64_t sqsh_easy_file_size2()
  • int sqsh_export_table_resolve_inode() has been replaced by int sqsh_export_table_resolve_inode2()
  • uint32_t sqsh_file_block_count() has been replaced by uint64_t sqsh_file_block_count2()
  • int sqsh_file_iterator_skip() has been replaced by int sqsh_file_iterator_skip2()
  • int sqsh_file_reader_advance() has been replaced by int sqsh_file_reader_advance2()
  • size_t sqsh_mapper_size() has been replaced by uint64_t sqsh_mapper_size2()

What's Changed

Full Changelog: v1.4.0...v1.5.0