CARVIEW |
Select Language
HTTP/2 200
date: Tue, 29 Jul 2025 16:12:40 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"9caba7aba43250ec08b1d6c31a332f58"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=px3lh9qFCycLMQ4szwdMSsRfo4LpWZ5kwzmZI9M9y7Hd6%2FAv%2BKGaO7aceeICfEpG4qhxk5unMU9D3yflGhWwPqncPfeP7dTMz74IE0VRlHX2%2FmS77sfwY5YNQO71zsHKXx1hQRNxmbdqk4qSwnqyB%2FaYEl35mM0W7Sm8eHfDpKECuSy%2F963AuxnrTXMaDS1gPdfTb36chUaSTOBgTJP6EY7e2ksmRxHXulwGvi6krSBO5DCH5g7VDqZH4ic3XTNwUTo46IqoDmH0O7%2BAJgdORg%3D%3D--ale4WjmudWtI2H%2F1--JxhkX8R9KWuve6oRb5lBOw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1166950962.1753805560; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 16:12:40 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 16:12:40 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D4D4:2896DD:DB87B2:1035C22:6888F2F7
GitHub - joeatwork/python-lzw: LZW compression in pure python
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 17
LZW compression in pure python
License
joeatwork/python-lzw
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is the README file for lzw, small, low level, pure python module for simple, stream-friendly data compression, built around iterators. Please see the accompanying LICENSE.txt file for license terms. lzw currently requires python 2.7 or python 3.4 to run. Before going on, potential users are advised to take a look at the gzip, zlib, bz2, zipfile, and tarfile modules available in the python standard library, which are dynamite-fast, mature, well supported, and generally awesome. Seriously, check them out! You've already got them! ---- This software is in Pre-Alpha release, any bug reports (or even stories about ways you use the software, or wish you could use the software) are appreciated! Mail joerbowers@joe-bowers.com with your info. --- INSTALLING you should be able to install this package with python setup.py install ---- Ok, moving on. The easiest way to use lzw is probably something like this >>> import lzw >>> >>> infile = lzw.readbytes("My Uncompressed File.txt") >>> compressed = lzw.compress(infile) >>> lzw.writebytes("My Compressed File.lzw", compressed) >>> >>> # Then later (or elsewhere) >>> infile = lzw.readbytes("My Compressed File.lzw", compressed) >>> uncompressed = lzw.decompress(infile) >>> for bt in uncompressed: >>> do_something_awesome_with_this_byte(bt) >>> See the module documentation for more details. --- The underlying compression algorithm for this module is as expressed in section 13 of the TIFF 6.0 specification, pages 58 to 62, available at the time of this writing on-line at https://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf Wherever possible, I've tried to adhere to the algorithm and conventions that are described (in exhaustive and yet very readable detail!) in that document, even when it gets a bit Tiff specific. Where there are differences, they are likely bugs in this code. --- Current dev priorities: - Hunt down some potential user applications, see why they're potential rather than actual, and then get on that bus. For now - Keep things as simple and intelligible as possible - Adhere as closely to the TIFF spec as is reasonable - Keep memory use low for good use of the iterators - Stay in pure python - Faster would be nicer, though...
About
LZW compression in pure python
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
You can’t perform that action at this time.