Skip to main content

Lossless Data Compression

Project description

ravdec

Ravdec is a module written in python, which is based on a Lossless Data Compression Algorithm designed by Ravin Kumar on 19 September, 2016. This compression algorithm have a fixed compression ratio of 1.1429 in all possible cases, It accepts data of following format: alphabets, numbers, and symbols. It can be used where the machine generates data at a very fast rate, that it became difficult for other algorithms to calculate the propability of a symbol, as data keeps on getting large, and is transmitted over the network with a much faster rate. In this case also, the above module, and algorithm gives the same compression ratio.

Ravdec- LossLess Data Compression

Algorithm Designer, and Module Developer: Ravin Kumar

This compression algorithm have a fixed compression ratio of 1.1429 in all possible cases, It accepts data of following format: alphabets, numbers, and symbols. Example: It can compress 1 GB to 896 MB.

Application of Ravdec

It can be used where the machine generates data at a very fast rate, that it became difficult for other algorithms to calculate the propability of a symbol, as data keeps on getting large, and is transmitted over the network with a much faster rate. In this case also, the above module, and algorithm gives the same compression ratio.

NOTE- The data that is to be compressed should have length of multiple of 8.(i.e 8 elements, or 16 elemnts or 24...so on)

  • file_compression(filename) : It is used to read data from a file, and create a compressed file with extention of ".rav"

  • file_decompression(filename) : It is used to read data from a previously compressed file, and create a decompressed file with extention of ".dec"

Example:

import ravdec 

# to compress the file have elements of multiple of 8.
ravdec.file_compression("filename.txt")

# to decompress the previously compressed file.
ravdec.file_decompression("filename.rav")
  • net_compression("data to be compressed of length of multiple of 8 ") - To compress the original data to transmit, that is needed to be transmitted.
  • net_decompression(" previously compressed data") - To decompress the previously compressed data, that is received.

It is used where the machine generates data at a very fast rate, that it became difficult for other algorithms to calculate the propability of a symbol, as data keeps on getting large, and is transmitted over the network with a much faster rate.

Example:


import ravdec

# for compression
compressed_data=ravdec.net_compression("ASDFGHJK")

# note- data to be compressed should have length of multiple of 8.(i.e 8 elements, or 16 elemnts or 24...so on)
# for decompression

decompressed_data=ravdec.net_decompression("previously compressed data")

Application of this module:

It can be used where the machine generates data at a very fast rate, that it became difficult for other algorithms to calculate the probability of a symbol, as data keeps on getting large, and is transmitted over the network with a much faster rate. In this case also, the above module, and algorithm gives the same compression ratio.

Installation using pip:

pip install ravdec

Also visit RavdecJs: Javascript implementation of ravdec. repository link

Copyright (c) 2016 Ravin Kumar
Website: https://mr-ravin.github.io

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ravdec-2.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file ravdec-2.0.tar.gz.

File metadata

  • Download URL: ravdec-2.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.8.10

File hashes

Hashes for ravdec-2.0.tar.gz
Algorithm Hash digest
SHA256 7567cccb9daf486b119ccade1945c365fb5c87d1654f1bb3bf0ecbcd14b55858
MD5 ad44150b19324553e6ad0017a4553904
BLAKE2b-256 d64036712cef91c19c6671ec325ac866f370d5b19a4941b6c8c92178a76dd0e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page