Skip to content

v1.1.0 — Fast Tail for Even More Compressed Formats

Choose a tag to compare

@acpguedes acpguedes released this 14 Aug 07:37
· 51 commits to main since this release
e28cd53

v1.1.0 — Fast Tail for Even More Compressed Formats

Summary

This release expands ztail’s capabilities to handle a broader range of compressed formats, improves CLI usability, and enhances portability.


What’s New

Added

  • Expanded format support: In addition to .gz, .bgz, and .zip, ztail now supports .bz2, .xz, and .zst compressed files.
  • Automatic format detection: Determines the compression format from file content (magic bytes), even if the file extension is missing.

Improved

  • Unified CLI options: Arguments like -n/--lines, -c/--line-capacity, and -e/--entry now work consistently across all supported formats.

  • Robustness & portability:

    • Added automated unit tests in the tests/ directory.
    • Improved CMake build system with a BUILD_PORTABLE option for easier compilation in different environments.

Usage Examples

# Tail the last 10 lines of any supported compressed file
./ztail -n 10 file.xz

# Tail a specific entry inside a ZIP archive
./ztail -n 20 -e my_file.txt archive.zip

# Tail last 5 lines with larger buffer for long lines
./ztail -n 5 -c 2048 file.bz2

Requirements

  • GNU C++17 or newer, CMake ≥ 3.10

  • Libraries:

    • zlib for .gz/.bgz
    • bzip2 for .bz2
    • liblzma for .xz
    • libzstd for .zst
    • libzip for .zip

Build Instructions

git clone https://github.com/acpguedes/ztail.git
cd ztail
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
make
ctest --output-on-failure  # Optional: run tests