https://github.com/phlowerteam/total_compressor
Tool (wrapper) for compression and handling multiple type of archives (Zip, GZip, RAR, 7z).
https://github.com/phlowerteam/total_compressor
Last synced: 9 months ago
JSON representation
Tool (wrapper) for compression and handling multiple type of archives (Zip, GZip, RAR, 7z).
- Host: GitHub
- URL: https://github.com/phlowerteam/total_compressor
- Owner: phlowerteam
- License: mit
- Created: 2013-12-13T21:33:05.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2021-07-10T05:20:15.000Z (about 5 years ago)
- Last Synced: 2024-04-17T17:11:00.583Z (about 2 years ago)
- Language: Ruby
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://scan.coverity.com/projects/phlowerteam-total_compressor)
total_compressor
================
Tool (wrapper) for compression and handling multiple type of archives (Zip, GZip, RAR, 7z).
Uses system calls
## Installation
Install appropriate tools before using:
apt-get install zlib1g zlib1g-dev zip rar p7zip-full
Add this line to your application's Gemfile:
gem 'total_compressor'
And then execute:
$ bundle
Or install it yourself as:
$ gem install total_compressor
## Usage
Command line:
tcomp [] full_path
- determines supported type of compression:
z - use Zip
g - use GZip (can't compress folder, only file)
r - use RAR
7 - use 7z
Examples:
tcomp z '/home/alex/The Lord of the Rings.txt' # creates '/home/alex/The Lord of the Rings.txt.zip'
tcomp /home/alex/Hobbit.txt.7z # creates /home/alex/Hobbit.txt
API:
require 'total_compressor'
TotalCompressor.compress('/home/alex/Hobbit.txt', 'zip') # => '/home/alex/Hobbit.txt.zip'
TotalCompressor.compress('/home/alex/Hobbit.txt', 'gzip') # => '/home/alex/Hobbit.txt.gzip'
TotalCompressor.compress('/home/alex/Hobbit.txt', 'rar') # => '/home/alex/Hobbit.txt.rar'
TotalCompressor.compress('/home/alex/Hobbit.txt', '7z') # => '/home/alex/Hobbit.txt.7z'
TotalCompressor.decompress('/home/alex/Hobbit.txt.7z') # => '/home/alex/Hobbit.txt'
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## Contacts
https://github.com/phlowerteam
phlowerteam@gmail.com
## License
Copyright (c) 2013 PhlowerTeam
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.