Git Product home page Git Product logo

fast_zlib's Introduction

Optimized version of longest_match for zlib

Summary

Fast zlib longest_match function. Produces slightly smaller compressed files for significantly faster time. For more details and updates please visit this page. Brief algorithm description is available on the home page of the project.

Source code repository is located on Github. Wiki page contains some additional notes and test results.

You may get precompiled binaries for Windows platform at this location

Build instructions

This library consists of 2 versions: C and assembly.

Building C version

You should replace longest_match() function in deflate.c with one located in Sources/match.h. One of possible ways is to making a file with contents looking like

#define ASMV
#include "deflate.c"

#undef local
#define local

#include "match.h"

void match_init()
{
}

and linking zlib with this file instead of deflate.c.

Building a 32-bit assembly version

This version is compatible only with x86 platform. To build a matcher, please start with obtaining the copy of the Netwide Assembler

For use with the Microsoft Visual Studio compile it with the following command line:

nasm match32.asm -f win32 -o match.obj

For the Watcom C use this:

nasm match32.asm -f obj -o match.obj -D OMF_FORMAT

For Linux use this command line:

nasm match32.asm -f elf32 -o match.o

Running tests

The library goes with built-in test application. Some information about its features could be found on wiki page.

On Unix platforms (those which has bash and perl out-of-the-box) you may simply run build.sh script located at the root directory of the project. This will build several versions of the test application and put them to obj/bin. There's a script which will run tests in automated mode, test.sh. Run test.sh --help to see available options. By default it will run several predefined tests for data locations from my own PC. If you'll need to change locations, just modify several bottom lined in the script (see DoTests <directory>).

For Windows platform, you'll need bash and perl to be installed and available via PATH environment variable. This could be achieved by installing Gygwin or MSYS projects to your computer. You may also get a set of required binaries here (you'll need BuildTools.zip).

License

This library is licensed under the BSD license.

fast_zlib's People

Contributors

gildor2 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.