Skip to content
Fastest Run Length Encoding
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ext . Dec 28, 2015
java . Aug 18, 2016
vs visual c++ Jun 12, 2017
.gitmodules . Aug 18, 2016
.travis.yml
README.md
conf.h TurboRLE: Config/Platform Jan 6, 2018
jtrle.c Java Native Interface Jan 6, 2018
makefile Makefile Jan 6, 2018
makefile.vs
time_.h
trle.c
trle.h TurboRLE: c/c++ header Jan 6, 2018
trle_.h TurboRLE: include Jan 6, 2018
trlec.c TurboRLE: encode Jan 6, 2018
trled.c TurboRLE: decode Jan 6, 2018

README.md

TurboRLE: Turbo Run Length Encoding Build Status

Efficient and fastest Run Length Encoding library
  • 100% C (C++ compatible headers), without inline assembly

  • Most efficient compression

  • No other RLE compress or decompress faster with better compression

  • faster compression and 2x faster decompression with 👍 SIMD

  • 👍 Java Critical Natives Interface. Access TurboRLE incl. SIMD! from Java

  • Compress better and up to 8 times faster and decompress up to 4 times faster than other fast RLEs

  • Can be faster than memcpy

  • 👍 ZERO! byte overhead

  • No modification of the raw data, preserving compressibility

  • Order preserving

TurboRLE
  • TRLE: TurboRLE - Efficient and fast Run Length Encoding
  • SRLE: TurboRLE Escape - Fast Run Length Encoding with automatic escape determination

Benchmark:

CPU: Sandy bridge i7-2600k at 4.2GHz, gcc 6.2, ubuntu 16.10

  • with TurboBench
  • Single thread
  • Realistic and practical benchmark with large files
Functions benchmarked
  • MRLE: Mespotine RLE MRLE
  • RLE64: Run Length Encoding - RLE64


C Size ratio% C MB/s D MB/s Name
3289669 0.8 2122 10499 trle
4482388 1.1 346 3467 mrle
4732081 1.2 7971 10156 srle 8
4732082 1.2 2110 10494 srle 0 (auto escape)
8431853 2.1 4848 10272 srle 16
8832647 2.2 1274 2921 rle64 8
9265516 2.3 2241 5722 rle64 16
13727062 3.4 8515 10421 srle 32
15175482 3.8 4609 9360 rle64 32
19844801 4.9 14114 10611 srle 64
21910714 5.4 8301 10232 rle64 64
403920058 100.0 9391 9161 memcpy

(bold = pareto) MB=1.000.000.

  • Checkers program "End Game Table Base": 1034.db
C Size ratio% C MB/s D MB/s Name
82421332 19.7 801 4145 trle
88055364 21.0 273 1255 mrle
92422320 22.0 814 5936 srle 0
92423009 22.0 1178 6697 srle 8
93905327 22.4 780 1660 rle64 8
113620895 27.1 1906 5550 srle 16
117590491 28.0 1341 2826 rle64 16
136948765 32.7 3581 8360 srle 32
143953177 34.3 2971 5506 rle64 32
165561604 39.5 5924 8953 srle 64
176442237 42.1 5090 7872 rle64 64
419225629 100.0 9323 9179 memcpy
C Size ratio% C MB/s D MB/s Name
378377069 37.8 500 2090 trle
419339698 41.9 506 5937 srle 0
419340318 41.9 626 4408 srle 8
422296235 42.2 558 1364 rle64 8
487461871 48.7 1396 4373 srle 16
498420792 49.8 1113 2511 rle64 16
549214826 54.9 2778 7540 srle 32
563503744 56.4 2730 5074 rle64 32
576619945 57.7 217 793 mrle
605764304 60.6 4998 7784 srle 64
620676412 62.1 5247 7376 rle64 64
1000000012 100.0 9364 9184 memcpy

Compile:

	git clone git://github.com/powturbo/TurboRLE.git
    cd TurboRLE
Linux + Windows MingW
	make
    or
	make AVX2=1
Windows Visual C++
	nmake /f makefile.vs
    or
	nmake AVX2=1 /f makefile.vs

Usage:

    ./trle file
    ./trle -e# file

	# = function id (see file trle.c)

Environment:

OS/Compiler (32 + 64 bits):
  • Linux: GNU GCC (>=4.6)
  • clang (>=3.2)
  • Windows: MinGW
  • Windows: Visual c++

References

Last update: 06 Jan 2018

You can’t perform that action at this time.