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

Compressor

by joernhees ALL

Open gzip & bzip2 files with Sublime Text

Details

Installs

  • Total 2K
  • Win 1K
  • Mac 676
  • Linux 385
May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16
Windows 0 0 0 0 1 2 2 2 1 0 1 0 1 2 1 0 0 0 2 0 2 1 0 4 0 1 3 2 1 0 1 0 2 1 4 0 2 1 1 1 0 0 2 0 0 2
Mac 0 2 1 2 1 2 1 0 0 1 2 1 2 1 0 0 0 3 2 1 1 1 0 0 1 3 1 0 0 0 3 1 1 1 1 0 0 2 2 1 1 0 3 0 0 0
Linux 0 1 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 1 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