Git Product home page Git Product logo

cs3411prog3's Introduction

                                                                            |

When encoding the encoder.c and encoder files, using gzip and our own encoder, the following results are obtained:

file | No encoding | gzip | ratio ------------+---------------+---------------+--------------- encoder | 13180 | 2512 | 0.1905918058 ------------+---------------+---------------+--------------- encoder.c | 5684 | 1653 | 0.2908163265

file | No encoding | encoder | ratio ------------+---------------+---------------+--------------- encoder | 13180 | 14504 | 1.1004552352 ------------+---------------+---------------+--------------- encoder.c | 5684 | 3376 | 0.593947924

While using encoder on either file didn't match even close with the results of gzip, encoder had a much larger improvment on encoder.c over encoder. I believe the reason for this is with the use of 15 frequent characters. When encoding the english letters of code, many characters repeat and finding these characters in the input is easy. With the encoder object file however, the character values are more or less "random". While not truely random of course, the values are much more spread out, reducing the number of repeated values. Because non repeated characters, which are 8 bits, require an encoding into 9 bits, the file size actually increases.

This leads to the conclusion that while this program is great for encoding text files, its usefullness is less appearent with other types of files.

cs3411prog3's People

Contributors

gcrevell avatar

Watchers

James Cloos 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.