Skip to content
LambogeniusDocs

Tar.gz Viewer

Plain .gz and .tar files

How single compressed files and uncompressed tar archives are handled.

VS Code extensionlambogenius.tar-gz-viewerFree · MIT license

Plain .gz files

Not every .gz file is a tar archive. A single compressed file, such as server.log.gz or config.json.gz, has nothing to list. When you open one, the viewer opens its decompressed text in a read-only tab named without the .gz (server.log) and closes the listing. Open File from Archive...does the same.

The viewer tells the two apart by checking for a valid tar header after decompressing, not by the file name.

Uncompressed .tar files

The viewer isn't the default editor for .tar, and the Explorer menu isn't shown for it. Open a .tar with Tar.gz Viewer: Open File from Archive... from the Command Palette: the file dialog accepts .tar, and the archive is read without decompressing.

Size limit

The whole archive is decompressed in memory. Archives larger than 512 MB after decompression are refused unless you raise the limit (see Commands and settings).