Giter Site home page Giter Site logo

compresor_archivos's Introduction

compresor_archivos Project

Author

This project was developed by:

Project Overview

The compresor_archivos project is a file compression and decompression tool implemented in Python. The project includes three main files: main.py, comprimir.py, and descomprimir.py. The application utilizes the Huffman coding algorithm for text, image, video, and audio file compression.

Files

main.py

This file contains the main application code, which uses the Tkinter library for the graphical user interface (GUI). The application allows users to select a file for compression or decompression and provides options for different file types. It supports compression and decompression of text, image, video, and audio files using the Huffman coding algorithm.

comprimir.py

This file includes the implementation of the file compression functionality. It defines a HuffmanTree class, which is used for Huffman coding. Additionally, there is a ColorQuantization class for quantizing colors in video files. Currently, the LZW compression code is commented out, and it can be uncommented if needed, but it is not functional yet.

descomprimir.py

This file contains the implementation of the file decompression functionality. It defines a HuffmanDecoder class, which is responsible for decoding Huffman-coded files. The descomprimir.py file mirrors the structure of comprimir.py and is designed to work with the corresponding compression logic.

Usage

To run the application, execute the main.py file. This will launch the graphical user interface where you can select files for compression or decompression.

Note: Make sure to install the necessary Python packages before running the application. You can install the required packages using the following command:

pip install bitarray opencv-python numpy

Supported File Types

The application supports the compression of the following file types:

  • Text files: .txt
  • Image files: .png, .jpg, .jpeg
  • Video files: .mp4, .avi, .mkv
  • Audio files: .mp3, .wav, .ogg

The aplication supports the descompression of the following file types:

  • Text files: .crtxt
  • Image files: .crpng, .crjpg, .crjpeg
  • Video files: .crmp4, .cravi, .crmkv
  • Audio files: .crmp3, .crwav, .crogg

The output file extensions are derived from the first two letters of my name, Cristian.

Compression Algorithm

The Huffman coding algorithm is used for file compression. It generates Huffman codes based on the frequency of characters in the input file, creating an optimal prefix-free binary tree.

Decompression

The decompression process involves decoding the compressed file using the Huffman codes generated during compression. The application supports the decompression of text, image, video, and audio files.

compresor_archivos's People

Contributors

kurisari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.