ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Compressor

by joernhees ST2/ST3

Open gzip & bzip2 files with Sublime Text

Details

Installs

  • Total 2K
  • Win 1K
  • OS X 593
  • Linux 348
Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3
Windows 1 1 1 0 0 2 0 0 1 0 2 0 1 1 0 1 0 2 1 2 1 0 1 2 0 0 0 3 0 2 3 1 3 1 0 0 0 0 3 2 3 2 0 0 3 1
OS X 0 0 0 0 0 0 0 0 0 0 2 0 1 1 1 1 0 1 4 0 1 0 0 0 3 0 0 0 0 0 0 0 3 0 1 0 0 0 0 1 0 1 0 0 0 2
Linux 0 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 3 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

sublime-compressor

Small plugin which transparently decompresses gzip (.gz) and bzip2 (.bz2) files when opened in Sublime Text.

This is an alpha release, use with care, feedback & code welcome!

When opening a new file this plugin will check the filename for a known compression suffix (.gz,.bz2 currently). If this matches, the useless binary view of the file will be closed and a new temporary file will be opened, filled with the decompressed content.

Installation

As usual via Package Control.

Current limitations (feedback & code welcome)

  • read only (would be cool if compressed file was substituted on save)
  • compressed file contents are assumed to be 'utf-8' encoded (maybe decompress into temp file which is opened the normal way instead? (allows for encoding detection))
  • single threaded (decompression should take place in bg thread)
  • no partial decompression (full file is decompressed and inserted in new file, maybe it's possible to just decompress a window)
  • no xz, lzma, flat zip-file support
  • compressor detection only based on filename, maybe use something similar to the file command
  • re-opening compressed file that is opened in a tab already will not jump to that tab but decompress it into a second copy