babooppa6 / python-lzw Goto Github PK
View Code? Open in Web Editor NEWThis project forked from joeatwork/python-lzw
LZW compression in pure python
License: MIT License
This project forked from joeatwork/python-lzw
LZW compression in pure python
License: MIT License
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 [email protected] 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 http://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...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.