Giter Club home page Giter Club logo

efficient-compression-tool's Introduction

Efficient Compression Tool

Efficient Compression Tool (or ECT) is a C++ file optimizer. It supports PNG, JPEG, GZIP and ZIP files.

Performance(v0.6)

All tests were run on OS X 10.11 using an i5-2500S and clang.

File: enwik8, 100,000,000 bytes, compressed into gzip format

Compressor File Size Time
gzip -9 36,475,811B 6.2s
zopfli -i1 35,139,225B 1m 6.4s
ECT -2 35,019,083B 16.9s
zopfli -i5 35,014,777B 1m 56.2s
ECT -3 35,012,378B 18.3s
zopfli -i15 34,987,258B 4m 3.2s
ECT -4 34,964,155B 22.5s
ECT -5 34,942,811B 28.9s
ECT -6 34,940,747B 49.7s
ECT -7 34,938,252B 1m 7.9s
ECT -8 34,937,694B 3m 54.8s

Building

From the terminal

ECT is built with cmake

mkdir build
cd build
cmake ../src
make

In addition, you can add the following arguments to the cmake call to turn various features on and off:

  • -DECT_MULTITHREADING=OFF: Turn off multithreading support
  • -DECT_FOLDER_SUPPORT=ON: Turn on the ability to recursively search folders (requires Boost filesystem)

With Xcode

You can use cmake to generate an Xcode project. Just add -G Xcode to the end of the cmake command:

mkdir build
cd build
cmake ../src -G Xcode
make

You will run into a slight issue, which is that Xcode doesn't know how to compile some of the asm files that are a part of the mozjpeg project. To fix this, locate your copy of nasm (/usr/local/bin/nasm in the example) navigate to the Build Rules of the simd target, and add a custom rule to process source files matching *.asm with the following script:

/usr/local/bin/nasm "-I${PROJECT_DIR}/mozjpeg" -DMACHO -D__x86_64__ "-I${PROJECT_DIR}/mozjpeg/simd/nasm/" "-I${PROJECT_DIR}/mozjpeg/simd/x86_64/" -f macho64 -o "${BUILT_PRODUCTS_DIR}/x86_64/${INPUT_FILE_BASE}.o" "${INPUT_FILE_PATH}"

And with $(BUILT_PRODUCTS_DIR)/x86_64/${INPUT_FILE_BASE}.o as the Output files

Assuming you're just using Xcode for development and don't need maximum speed, you can also just disable the asm files by adding -DWITH_SIMD=OFF to the cmake call.

efficient-compression-tool's People

Contributors

alyoshavasilieva avatar andrews05 avatar astiob avatar chipitsine avatar ct1994 avatar dave-atx avatar fhanau avatar jordanius avatar megabyte avatar nomoon avatar sewer56 avatar tellowkrinkle avatar tssajo 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.