v1.1.0 — Fast Tail for Even More Compressed Formats
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,ztailnow supports.bz2,.xz, and.zstcompressed 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/--entrynow work consistently across all supported formats. -
Robustness & portability:
- Added automated unit tests in the
tests/directory. - Improved CMake build system with a
BUILD_PORTABLEoption for easier compilation in different environments.
- Added automated unit tests in the
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.bz2Requirements
-
GNU C++17 or newer, CMake ≥ 3.10
-
Libraries:
zlibfor.gz/.bgzbzip2for.bz2liblzmafor.xzlibzstdfor.zstlibzipfor.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