Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Compressed files and archives

Old logs are often compressed: app.log.2.gz, u_ex261106.log.gz, app-2026-11-05.log.zst, logs-2026-11-05.zip, history.tar.gz, support-bundle.7z, messages.3.xz. TKTail investigates them where they are, with the same search, formats (your Custom Format Studio profiles too), field conditions, aggregation, time ranges and evidence as plain files: a search never unpacks anything, and opening one log from an archive decodes only that log, for its tab. Compression changes how a log is stored, not how you investigate it.

Formats

FormatNamesTierReadEntries listedSearch, formats, aggregateEvidenceAI (MCP)A log’s historyExplorerFreePro addsSinceNotes
ZIP.zipfirst-classyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.1entries listed from the central directory (no entry decompressed); encrypted entries refused
ZIP64.zipfirst-classyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.164-bit sizes and offsets (entries and archives over 4 GB, more than 65,535 entries)
GZIP.gzfirst-classyes-yesyesyesyesyesyesa log’s history with it1.3.0-rc.1one stream, read forward (no random access); a log’s history takes it by its logical name
TAR.tarfirst-classyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.2headers walked, other entries’ contents skipped
TAR.GZ.tar.gzfirst-classyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.1walked from its start (listing a large one costs its decompression)
TGZ.tgzfirst-classyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.1TAR.GZ by another name - the same reader
ZSTD.zst, .zstdfirst-classyes-yesyesyesyesyesyesa log’s history with it1.3.0-rc.1one stream, read forward; a frame asking for more than a 32 MiB window is refused
TAR.ZST.tar.zst, .tar.zstd, .tzstfirst-classyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.1walked from its start
7Z.7zadditionalyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.2entries listed from its header (no entry decompressed); LZMA, LZMA2, PPMd, BZIP2, Deflate, ZSTD, BCJ / BCJ2 / ARM64 / delta filters; a solid block is read from its start; encrypted archives and entries, multi-volume archives and a dictionary or PPMd model over 256 MiB are refused
RAR.raradditionalyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.2RAR 2.9-4 (RAR4) read sequentially (a solid archive from its start); encrypted and multi-volume archives are not read
RAR5.raradditionalyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.2read sequentially (a solid archive from its start); encrypted entries and multi-volume archives are not read
XZ.xzadditionalyes-yesyesyesyesyesyesa log’s history with it1.3.0-rc.2one stream, read forward; an LZMA dictionary over 256 MiB is refused
TAR.XZ.tar.xz, .txzadditionalyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.2walked from its start
BZIP2.bz2additionalyes-yesyesyesyesyesyesa log’s history with it1.3.0-rc.2one stream, read forward
TAR.BZ2.tar.bz2, .tbz2, .tbzadditionalyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.2walked from its start
LZ4.lz4additionalyes-yesyesyesyesyesyesa log’s history with it1.3.0-rc.2the LZ4 frame format (lz4’s default) and lz4’s legacy format (lz4 -l); not raw LZ4 blocks or other LZ4 framings
TAR.LZ4.tar.lz4additionalyesyesyesyesyes-yesyes - one entry at a timeits entries searched together1.3.0-rc.2walked from its start
LZMA (lzma-alone).lzmanot read----------not qualified in this release - an ordinary binary file
LZIP.lznot read----------not qualified in this release - an ordinary binary file

First-class formats use TKTail’s fastest decoders (zlib-ng, zstd) and are benchmarked with every release; additional formats are investigated in exactly the same way, at the speed of their own decoder (LZMA, BZIP2 and RAR decode more slowly than gzip or zstd). A file of a format TKTail does not read is an ordinary (binary) file to it: a search skips it. Encrypted archives and archives split into volumes are not read. TKTail never runs another program (7-Zip, WinRAR, unrar, gzip, xz, bzip2, lz4, tar …) to read a file - every format above is read by TKTail itself, with nothing else installed.

Free and Pro

Free lets you investigate a log wherever it is stored; Pro turns logs, rotations and archives into one investigation scope. No format is paid for: every edition reads every format above, with the same safety.

FreeTrial / Pro
One compressed log (app.log.2.gz, .zst) - open it as a tab, search, formats, Custom Format Studio profiles, aggregation, evidenceyesyes
An archive in the Explorer - its entries listed; one entry opened as a tab or searched (logs.zip::gateway/gateway.log)yesyes
A folder search: its plain files and compressed logs (.gz, .zst, .xz, .bz2, .lz4)yesyes
Archive contents searched together - several entries of an archive, or the archives in a folder search: one search, one aggregation, evidence from several entries-yes
A log’s history - its rotated and compressed generations searched as one source-yes
AI clients: files, folders and compressed logs the AI access rules allow (Extended Investigation)yesyes
AI clients: a log’s history and an archive’s entries searched as one source-yes
Safety: bounded memory, zip-bomb and size limits, cancellation, nothing extracted for a search, no other program runyesyes

A search that needs a capability your edition does not have is not started: TKTail says which one, and the search stays in the builder as you made it - after entering a license, run it again.

Browse an archive

Double-click an archive in the Explorer - or select it and press Enter, or right-click > Browse Archive - and the Explorer lists the logs inside it, by their path in the archive, with their size and date. File > Open (and dropping an archive on TKTail) shows an archive there too.

  • A ZIP’s and a 7Z’s entries come from the archive’s directory at once - nothing is decompressed. A TAR (in any compression) and a RAR have no directory: their entries appear while TKTail reads through the archive, the status line says how much of it has been read, and Esc stops the listing.
  • The filter box filters the entries by name; the columns sort them. Folders, links and devices are not listed; the Explorer lists at most 10,000 entries of one archive (the status line says when there are more - search the archive to read them all).
  • Right-click an entry: Open (Enter), Open in Split Right (Ctrl+Enter), Search This Entry… / Search Selected Entries…, Search All Entries… (the Advanced Search builder with the archive as its source - add a condition and run it), Copy Entry Path (logs.zip::api/api.log), Show the Archive File (Backspace - back to its folder), Refresh (F5).

Open an entry as a tab

Open an entry in the Explorer - or open a compressed log (app.log.2.gz) with File > Open, the Explorer or a drop, or either from the command line (tktail open "support-bundle.zip::api/api.log", Command line) - and it becomes an ordinary tab: the same viewer, format detection and Custom Format Studio profiles, Find (Ctrl+F), the Inspector, Search and Save as Evidence. Its caption names the archive: api.log [support-bundle.zip]; the title bar shows the archive’s folder, Copy Path copies the entry’s address (...\support-bundle.zip::api/api.log), and Reveal in Explorer, Open Containing Folder and Properties show the archive file.

  • Read where it lies. The tab reads the log inside the archive: nothing is unpacked or copied to disk, and its memory is bounded (tens of megabytes, not the log’s size) - a 40 GB gateway.log inside a ZIP opens like a small one. The tab appears at once with the first lines; the rest of the log is read in the background to find its end and its lines (Jobs shows how far; Cancel stops it - so does closing the tab).
  • A compressed log can only be read forward from its start: scrolling or jumping ahead reads up to that point, and going back to an earlier part reads it again from the start - in the background, the window stays responsive and shows what is ready. Nothing else in the archive is decoded.
  • Opening the same entry again shows its tab. A tab of an archive entry is not restored at the next start and cannot be moved to another window - open it again from the archive.
  • Search results, evidence and AI clients name the archive and its entry; evidence is read again from the archive itself.
  • The tab shows the log as it was when it was opened: it opens PAUSED (nothing to follow), and alerts do not watch it.

Search a log’s history

A log rotates: app.log is written now, app.log.1 is yesterday’s, app.log.2.gz and app.log.3.gz are older and compressed. Or a log per day: u_ex261108.log, u_ex261107.log.gz, u_ex261106.log.gz. TKTail treats them as one history and searches it in one search:

  • Advanced Search > Builder > Source > The history of the current source (rotated and compressed) - or choose Log history as a source’s kind and the log file (any of its files).
  • TKTail reads only the NAMES in the folder to find the generations - numbered (app.log.1, app.log.2.gz; a higher number is older) or dated (dated file series: a date, time and number in the name) - and a compressed file is the generation its name without .gz / .zst / .xz / .bz2 / .lz4 names: app.log.2.gz is app.log.2.
  • The generations are searched oldest first, each once. While a logger compresses a rotated file, the plain file and its copy are side by side (app.log.1 and app.log.1.gz): TKTail searches the plain file and skips the copy - the summary says “1 compressed copy of plain files searched once”. A generation stored several ways is read from the first of: the plain file, .gz, .zst, .xz, .bz2, .lz4 - always the same choice, never counted twice. Files that only look alike (the same size, a similar name) are never taken for copies of each other.
  • The results name each file; one aggregation (top clients, counts, sums, a histogram) covers all generations.
  • A damaged generation (a truncated .gz) does not stop the search: the others are searched, the summary says which file could not be read and why, and the search is marked Incomplete.
  • A history is the log’s own files: a log inside an archive is never made a generation of it. A history’s past records never fire an alert, and live tails keep following the plain file being written.

An example (synthetic): a customer reports a failed order from yesterday evening. Today’s trace.log starts at midnight; yesterday is trace.log.1.gz .. trace.log.5.gz, about 1.3 GB once decompressed. Search the history of trace.log for order=4711 (or Search a folder with trace.log*): one search reads every generation, the result names trace.log.2.gz and the position in its decompressed text. Open at Match shows the entry with the lines around it, Save as Evidence keeps it - nothing is unpacked to disk, and the same search tomorrow still finds it as long as the generations exist.

Search a folder - compressed logs and archive contents

A folder search (Advanced Search with a folder, or the Explorer’s Search Contents…) reads what the folder holds - and you decide how far that goes. In the builder, a folder source has, below its file masks, a row with two switches:

DefaultWhat it searches
Compressed log fileson.gz, .zst, .xz, .bz2, .lz4 files, as the logs they hold - compressed history is ordinary log history
Archive contentsoffthe logs inside the folder’s ZIP, 7Z, RAR and TAR files (in any compression) - an explicit widening of the search
Archives inside archivesneveran archive inside an archive is a binary entry - never expanded

Archive contents are off by default because one archive can hold many unrelated logs: a folder search does not become expensive just because a large support bundle happens to lie in the same folder. The simple form’s folder search uses the defaults; switch to the builder to search archive contents.

  • File masks (Include files) choose the folder’s files; they match a compressed log by its name without the compression too (*.log takes app.log.2.gz). An archive is taken by its entries, whatever the file masks say; Exclude masks skip archives by name as well (*.bak.zip).
  • Entries in archives (with Archive contents on) choose the entries by their path in the archive (*.log, W3SVC*/*); left empty, the file masks choose them. Entries that do not match are not searched - in a ZIP they are not decompressed at all; a compressed TAR or a solid 7Z / RAR is decoded through them on its way to the next wanted entry. A folder search reads at most 1,000 entries of one archive.
  • Before you search, the row says what the scope would read - from names, sizes and archive directories only, nothing decompressed: “Archive contents: 3 archives (1.2 GB), 840 entries to search; in all about 9.6 GB to read - moderate”, or with archive contents off “2 archives here (3.4 GB) not searched - Archive contents adds them (heavy)”. Light (under 5 GB to read), moderate (under 50 GB) and heavy say how much work it is, never what your license allows; a compressed size counts about ten times (its decoded size is known only by reading it), and a compressed TAR’s or a RAR’s entries are known only while it is searched. TKTail never asks you to confirm - every search can be cancelled at any moment.
  • While it runs, results appear as they are found, and Cancel stops it at once. A compressed TAR is read once, from its start, for all its wanted entries.
  • The summary says what was searched and what was left out: “12 entries of 3 archives searched”, “2 archives not searched (archive contents are off for this folder)”. 0 results with archives left out means 0 in this scope - not in the folder.
  • Results name the archive and the entry (support-bundle.zip :: api/api.log); one aggregation covers plain files, compressed logs and archive entries together (for an IIS folder: sc-status >= 500, grouped by c-ip, top 20 across u_ex*.log, u_ex*.log.gz and the W3SVC1 logs in last month’s ZIP); evidence keeps folder -> archive -> entry -> record.
  • A Saved Search keeps the folder’s choices as they were saved - a search saved with archive contents off stays off, whatever the defaults become.
  • Searching archive contents in a folder needs Trial or Pro; plain files and compressed logs are searched in every edition.

Search an archive

  • Advanced Search > Builder > Source > An archive or compressed file… - any format in the table above - or the Explorer’s Search This Entry / Selected Entries / All Entries. An archive’s logs (ZIP, 7Z, RAR, a TAR in any compression) are each a source of their own (logs.zip :: api/api.log); Include entries / Exclude entries pick some by their path in the archive (var/log/*, *.log); write logs.zip::gateway/gateway.log to search exactly one entry. Binary entries are skipped.
  • Several archives - a week of daily .tar.gz bundles - are several sources of one search: add each, or search their folder with archive contents on.

Formats and Custom Format Studio

A compressed log has the format its plain name would have: u_ex261107.log.gz is an IIS W3C log (its #Fields read from the file), orders.olog.1.gz takes the Custom Format Studio profile associated with orders.olog*. An entry is resolved by its own name (logs.zip :: trace.log as trace.log) - in a search and in its tab alike. Associate a profile by file names (orders.olog*) rather than an extension when rotation adds numbers to the name.

Look at a result

A result in a compressed log or an archive entry opens without decoding the whole log into a tab:

  • Open at Match (double-click, Enter) reads the log up to the result - in the background, shown in Jobs, where you can cancel it - and shows the result’s line with 40 lines around it in a read-only window, the result selected. Copy in that window copies the text.
  • Copy Line and Copy Match copy the exact text from the compressed log the same way.
  • Reveal in Explorer and Open Containing Folder show the archive file.
  • To read the whole log, open it as a tab (above).

If the archive was replaced or deleted since the search, TKTail says so instead of showing other text.

Save evidence from compressed logs

Save as Evidence works on results from compressed logs and archive entries - and on a tab of an entry - like on any other (Saving evidence): the records with their context, redacted. The package’s manifest names the archive file and its file identity, the log inside it and how it is stored (gzipStream, zstdStream, xzStream, bzip2Stream, lz4Stream, zipEntry, tarEntry, sevenZipEntry, rarEntry); positions in it are positions in the decompressed log, not in the archive file. The records are read again from the archive itself. The package stays valid after the archive is deleted.

AI assistance

With Extended Investigation (the files the user’s AI access rules allow), an AI assistant uses the same sources and the same rules (the agent playbook):

  • tktail_get_log_history lists a log’s generations, tktail_list_archive_entries an archive’s entries (from its directory or headers - nothing decompressed), and tktail_search takes {"kind":"history"}, {"kind":"archive"} and {"kind":"folder"} sources - one search, one aggregation, evidence.
  • A folder’s scope is explicit, with the defaults of the builder: compressed logs in ("compressed", default true), archive contents out ("archives", default false; "entryInclude" narrows it), nested archives never. Every answer’s scope says what the declared scope searched and what it left out (archivesExcludedByScope with a short hint), so “0 matches” is never read as “the folder has none”; TKTail never widens a scope by itself.
  • "estimateOnly": true returns the same estimate the builder shows - nothing decompressed or searched.
  • An edition without archive contents answers capability_unavailable with requiredCapability: "archive-scope".
  • Every result says storageKind, archiveFormat, container and, for an archive, entry. The assistant cannot unpack anything or give a password, and needs no other tool to read compressed history.
  • Every result also carries a reference (evidenceRef): with it the assistant reads the whole entry (tktail_get_record) and the entries around it (tktail_get_records_around) from the compressed log itself - decoded in the background up to the result, the file checked to be the one searched - and can save it as evidence. It does not have to search the file again or rebuild an entry with a regular expression. A file that changed since the search is said (stale), never read in its place.

Safe with any archive

  • Bounded. TKTail keeps only a few megabytes of a decompressed log in memory at a time, whatever its size.
  • Two at a time. At most two compressed files are decompressed at once for searches in the whole application; other searches wait their turn (they are not slowed down by a third and fourth decompression). Tabs of archive entries have a small pool of their own (six readers), so looking at an entry never waits for a search. Live tails and alerts never read compressed history, so searching old archives never delays them.
  • Cancellable. Cancel stops a search, a listing, an Open at Match or an entry being opened within a fraction of a second, also in the middle of a large file.
  • Hostile archives. A log that would expand far beyond what logs do (a “zip bomb”) or past 64 GB stops being read, with the reason in the search’s summary; a damaged or truncated archive is reported the same way. The rest of the search goes on. One search also counts all it decompresses together: past 1 TB, or past a thousand times what it read (after its first 256 MB), it stops reading archives and says so - a folder of many small bombs adds up too. Entries with names longer than 1,024 characters are skipped, and a TAR is walked through at most 100,000 entries. Names in an archive are only ever shown - a search writes nothing anywhere, and neither does a tab of an entry (it reads the archive); links, devices and other special entries are never read; an archive inside an archive is a binary entry (never expanded).
  • Decoder memory. An archive’s header can ask a decoder for a lot of memory (an LZMA dictionary or a PPMd model of up to 4 GB). TKTail never gives one decoder more than 256 MB at once: such an archive stops being read with “a safety limit stopped reading it” instead of taking gigabytes. Archives made by xz, 7-Zip, WinRAR or bzip2 with their usual settings (up to 64 MB) read normally.

Limits

  • Live tails and alerts work on plain files only; a tab of an archive entry is a snapshot of it.
  • A rotating log is followed in its tab through its plain files; its compressed previous files (app.log.2.gz) are part of its history - listed in the rotation menu, searched with its history - never followed or replayed by an alert. They are generations of the log, not archive contents: no archive option is involved.
  • A compressed TAR (.tar.gz, .tar.zst) and a solid 7Z or RAR are read from their start: listing or searching their last entry decompresses the entries before it.
  • A compressed log has no random access: in a tab of an entry, going back to an earlier part reads the log again from its start (in the background).
  • Archives inside archives are never searched.