目录
UCL is a portable lossless data compression library written in ANSI C.
是一个用 ANSI c 编写的便携式无损数据压缩库。
UCL implements a number of compression algorithms that achieve an excellent compression ratio while allowing *very* fast decompression. Decompression requires no additional memory.
实现了一系列压缩算法,这些算法在实现优秀的压缩比/值的同时允许非常快速的解压缩。解压缩不需要额外的内存。
UCL is an OpenSource re-implementation of some NRV compression algorithms.
UCL 是对一些 NRV 压缩算法的 OpenSource 重新实现。
As compared to LZO, the UCL algorithms achieve a better compression ratio but decompression is a little bit slower. See below for some rough timings.
与 LZO 相比,UCL 算法实现了更好的压缩比/值,但是解压缩速度有点慢。以下是一些粗略的时间安排。
Overview
UCL is written in ANSI C. Both the source code and the compressed data format are designed to be portable across platforms.
UCL 是用 ANSI c 编写的,源代码和压缩的数据格式都被设计成可跨平台移植的。
UCL implements a number of algorithms with the following features:
伦敦大学学院实现了一系列具有以下特点的算法:
- Decompression is simple and * 减压很简单 *very 非常* fast. * 快速
- Requires no memory for decompression. 不需要解压缩内存
- The decompressors can be squeezed into less than 200 bytes of code. 可以将解压缩器压缩到少于200字节的代码中
- Focuses on compression levels for generating pre-compressed data which achieve a quite competitive compression ratio. 集中于压缩级别生成预压缩数据,实现一个相当有竞争力的压缩比
- Allows you to dial up extra compression at a speed cost in the compressor. The speed of the decompressor is not reduced. 允许您以压缩机中的速度成本拨号进行额外的压缩。减压器的速度并没有降低
- Algorithm is thread safe. 算法是线程安全的
- Algorithm is lossless. 算法是无损的
UCL supports in-place decompression.
UCL 支持就地减压。
UCL and the UCL algorithms and implementations are distributed under the terms of the GNU General Public License (GPL) { auf Deutsch }. Special licenses for commercial and other applications are available by contacting the author.
UCL 和 UCL 的算法和实现都是在 GNU通用公共许可协议协议(GPL)的条款下发布的。特殊许可证的商业和其他应用可与作者联系。
How fast is fast ? 快就是快?
Here are some original timings on an ancient Intel Pentium 133 back in the year 2000:
以下是2000年英特尔奔腾133的一些原始时间:
- memcpy(): ~60 MB/sec Memcpy () : ~ 60mb/sec
- UCL decompression in optimized assembler: ~13 MB/sec 优化汇编程序的 UCL 解压缩: ~ 13mb/sec
- LZO decompression in optimized assembler: ~20 MB/sec 优化汇编器中的 LZO 解压缩: ~ 20mb/sec
- LZO decompression in C: ~16 MB/sec C 中的 LZO 解压缩: ~ 16 MB/sec
Portability 可塑性
UCL's decompressors should work on any system around - they could even get ported to 8-bit processors such as the Z-80 or 6502. (In fact I expect a 6502 implementation too happen soon in the process of extending the UPX executable packer).
UCL 的解压缩器应该可以在周围的任何系统上工作——它们甚至可以被移植到8位处理器上,比如 z-80或6502。(事实上,我期望在扩展 UPX 可执行封装程序的过程中很快就能实现6502)。
The compressors currently require at least 32-bit integers. While porting them to more restricted environments (such as 16-bit DOS) should be possible without too much effort this is not considered important at this time.
压缩器目前至少需要32位整数。虽然可以将它们移植到更受限制的环境(例如16位 DOS) ,但不需要付出太多努力,这一点目前并不重要。