gongliyu / compfile Goto Github PK
View Code? Open in Web Editor NEWCommon interfaces for manipulating compressed files (lzma, gzip etc)
License: MIT License
Common interfaces for manipulating compressed files (lzma, gzip etc)
License: MIT License
Add a function is_compressed_file to determine whether a file is a compressed file
>>> compfile.is_compressed_file('a.txt.bz2')
True
>>> compfile.is_compressed_file('a.txt')
False
>>> compfile.is_compressed_file('a.txt.gz')
True
The classes for corresponding compression type is actually useless. Since the only use case to manipulate compressed file is open it and return a file object, the simplest API is provide a function :code:compfile.open(fname, mode, ...)
. The automatic type determination mechanism could be kept to make it flexible. There, we should remove the classes. If more requirements appears in the future, we could add it back.
The decorator functionality has been moved to the decoutils package. Use that package could reduce codes.
If auto_engine cannot find a engine, then treat the file as an uncompressed file. In this case, compfile.open will open the file use built-in function open instead of raising an exception.
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.