Coder Social home page Coder Social logo

weird_ascii_bit_test's Introduction

Needs gzip, sh and cargo.

Run sh run_test.sh.

The Rust program here builds a stream of repetitive bits with a repetitive pattern that is seven bits long (not eight), and outputs the bits in a couple of different formats. The shell script then checks how long they are, before and after gzip.

Output on my machine looks like:

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s
     Running `target\debug\weird_ascii_bit_test.exe`
Wrote packed file
Wrote ASCII file (1 line per byte)
Wrote ASCII file (1 line per 72 bytes)
Wrote ASCII file (oops all bytes)
7-bit predictable looking numbers
encoded as an ASCII string:
output.ascii
raw:     7168 bytes
gzip -4: 1281 bytes
gzip -9: 138 bytes

packed into bytes
output.packed
raw:     896 bytes
gzip -4: 515 bytes
gzip -9: 515 bytes

encoded as an ASCII string, 1 byte per line:
output.ascii_8
raw:     8064 bytes
gzip -4: 1749 bytes
gzip -9: 867 bytes

encoded as an ASCII string, 72 bytes per line:
output.ascii_576
raw:     7181 bytes
gzip -4: 1321 bytes
gzip -9: 178 bytes

weird_ascii_bit_test's People

Contributors

richardbarrell avatar

Stargazers

 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.