Skip to main content

PyPI version

CaaS

CaaS is a Python library which provides Compression as a Service. CaaS offers reasonable and high speed compression by taking advantage of the Serverless Technology. CaaS mainly performs effective compression on Image, Audio and Video files and effective lossless compression/decompression on text files. CaaS library uses custom file compression algorithms which are deployed on Openwhisk Serverless Framework.

Installation

CaaS can be installed by running pip3 install CaaS. It requires Python 3.6.0 and above to run.

Abstract Usage

The detailed usage of each interface is given under the section Interfaces. Here is the abstract usage of the CaaS library.

from CaaS import interface
response = interface("filename_of_file_to_compress","filename_of_compressed_file","authorization_key")

here, interface: interface for compressing image, video, audio and text files. It is discussed in detail for each type of file in Interfaces section.

response: stores HTTP status code returned for your request.

Interfaces

CaaS::image_compression

  • image_compression is the interface for Image Compression.
  • It uses Semantic Perceptual Image Compression algorithm to compress the image files.
  • Semantic Perceptual Image Compression algorithm is implemented and deployed on the Openwhisk Serverless Framework.
  • CaaS provides support for compression of JPEG and PNG image files.

Usage:

from CaaS import image_compression
response=image_compression("image_file_to_compress","filename_of_compressed_image_file","authorization_key")

CaaS::video_compression

  • video_compression is the interface for Video Compression.
  • It uses Semantic Perceptual Compression algorithm to compress the video files.
  • Semantic Perceptual Compression algorithm is implemented and deployed on the Openwhisk Serverless Framework.
  • CaaS provides support for compression of MP4 video files.

Usage:

from CaaS import video_compression
response = video_compression("video_file_to_compress","filename_of_compressed_video_file","authorization_key")

CaaS::audio_compression

  • audio_compression is the interface for Audio Compression.
  • It uses Principal Component Analysis algorithm to compress the audio files.
  • Principal Component Analysis algorithm is implemented and deployed on the Openwhisk Serverless Framework.
  • CaaS provides support for compression of WAV and MP3 audio files.

Usage:

from CaaS import audio_compression
response = audio_compression("audio_file_to_compress","filename_of_compressed_audio_file","authorization_key")

CaaS::text_compression

  • text_compression is the interface for Text Compression.
  • It uses Adaptive Huffman Compression algorithm to compress the text files.
  • Adaptive Huffman Compression algorithm is implemented and deployed on the Openwhisk Serverless Framework.
  • CaaS provides support for compression of TXT Files and Programming Files(e.g.: .cpp, .py, .java, .js, etc).

Usage:

from CaaS import text_compression
response = text_compression("text_file_to_compress","filename_of_compressed_file","authorization_key")

CaaS::text_decompression

  • text_decompression is the interface for Text Decompression.
  • It uses Adaptive Huffman Decompression algorithm to decompress the text files.
  • Adaptive Huffman Decompression algorithm is implemented and deployed on the Openwhisk Serverless Framework.
  • CaaS provides support for decompression of TXT Files and Programming Files(e.g.: .cpp, .py, .java, .js, etc).
NOTE: As the implemented Text Compression and Decompression is lossless, the input to the text_decompression interface must be the text file compressed with the text_compression interface.

Usage:

from CaaS import text_decompression
response = text_decompression("file_to_decompress","filename_of_decompressed_text_file","authorization_key")

Metadata

Release files for CaaS 1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CaaS 1.5
File Size Uploaded
CaaS-1.5.tar.gz 3.9 kB Details

Release files / CaaS-1.5.tar.gz

Download URL CaaS-1.5.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b0ae6b4ae417febf650d924f9687742175c4bca86eb97291d3c15bff7df84308
BLAKE2b-256 checksum
How to use checksums
d2f3ac5a6fa3cff0e5399862a58ea2f4a0e710469853779590769d1d51255ada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.5 This release

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page