GithubHelp home page GithubHelp logo

ascoderu / compression-benchmarks Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 3.0 85 KB

Benchmark to compare serialization and compression algorithms

Home Page: https://ascoderu.ca/compression-benchmarks/

License: Apache License 2.0

Python 100.00%
python3 gzip bzip2 zstandard xz msgpack avro jsonlines bson aes-encryption

compression-benchmarks's Introduction

compression-benchmarks

What's this?

This repository contains serialization, compression and encryption benchmarks for the Lokole email data exchange protocol with the aim to find the method of encoding our dataset in the smallest possible size to save bandwidth for users of the system.

๐Ÿ’ก Do you know a compression or serialization that could make our data smaller? Then open a pull request! :octocat:

Setup

Install the requirements with pip install -r requirements.txt -r requirements-dev.txt.

Run the tests with python -m benchmarks.tests and run the linter with flake8 benchmarks.

Run the benchmarks via python -u -m benchmarks <emails-zip-url>.

Results

Benchmark results are kept up to date by Github Actions at ascoderu/compression-benchmarks.

compression-benchmarks's People

Contributors

adamsclafani avatar c-w avatar dependabot[bot] avatar i-mure avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

compression-benchmarks's Issues

Fix BSON serializer

The BSON serializer currently crashes for many inputs. I believe this is because the serialized format for a specific email may contain the \n character, e.g. in attachments... but we also use this character as a record separator to be able to read/write multiple serialized emails to a single file. This means that when we try to deserialize an email, reading to the first \n character may give us back a corrupt BSON record if the original email contained a raw \n character.

A suggested fix is either to find a way to stream multiple records in a single file pointer (similar to the CBOR implementation), or find another record delimiter which is guaranteed not to clash with any data in the file. But of course, other approaches that fix the problem are welcome too!

Parallelize execution

We generate one benchmark run per combination of serializer, compressor and encryptor (see code). The runs have no dependency on each other, so it should be possible to run them in parallel using multiprocessing.

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.