{"id":17724768,"url":"https://github.com/jibsen/brieflz","last_synced_at":"2025-04-15T21:08:55.604Z","repository":{"id":57995606,"uuid":"41963452","full_name":"jibsen/brieflz","owner":"jibsen","description":"Small fast Lempel-Ziv compression library","archived":false,"fork":false,"pushed_at":"2024-02-02T07:24:54.000Z","size":281,"stargazers_count":104,"open_issues_count":4,"forks_count":18,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-15T21:08:44.316Z","etag":null,"topics":["c","compression","compression-algorithm","library"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jibsen.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-05T14:15:52.000Z","updated_at":"2025-02-13T12:10:47.000Z","dependencies_parsed_at":"2024-10-25T20:08:24.607Z","dependency_job_id":"fd16b6af-ac58-46e5-93d0-1f2e4fffdb14","html_url":"https://github.com/jibsen/brieflz","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbrieflz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbrieflz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbrieflz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbrieflz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jibsen","download_url":"https://codeload.github.com/jibsen/brieflz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249153945,"owners_count":21221330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","compression","compression-algorithm","library"],"created_at":"2024-10-25T15:48:43.242Z","updated_at":"2025-04-15T21:08:55.583Z","avatar_url":"https://github.com/jibsen.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nBriefLZ - small fast Lempel-Ziv\n===============================\n\nVersion 1.3.0\n\nCopyright (c) 2002-2020 Joergen Ibsen\n\n\u003chttp://www.ibsensoftware.com/\u003e\n\n[![BriefLZ CI](https://github.com/jibsen/brieflz/actions/workflows/brieflz-ci-workflow.yaml/badge.svg)](https://github.com/jibsen/brieflz/actions) [![codecov](https://codecov.io/gh/jibsen/brieflz/branch/master/graph/badge.svg)](https://codecov.io/gh/jibsen/brieflz)\n\n\nAbout\n-----\n\nBriefLZ is a small and fast open source implementation of a Lempel-Ziv\nstyle compression algorithm. The main focus is on speed and code footprint,\nbut the ratios achieved are quite good compared to similar algorithms.\n\n\nWhy BriefLZ?\n------------\n\nTwo widely used types of Lempel-Ziv based compression libraries are those\nthat employ [entropy encoding][entropy] to achieve good ratios (like Brotli,\nzlib, Zstd), and those that forgo entropy encoding to favor speed (like LZ4,\nLZO).\n\nBriefLZ attempts to place itself somewhere between these two by using a\n[universal code][universal], which may improve compression ratios compared to\nno entropy encoding, while requiring little extra code.\n\nNot counting the optional lookup tables, the compression function `blz_pack`\nis 147 LOC, and the decompression function `blz_depack` is 61 LOC (and can be\nimplemented in 103 bytes of x86 machine code).\n\nIf you do not need the extra speed of libraries without entropy encoding, but\nwant reasonable compression ratios, and the footprint of the compression or\ndecompression code is a factor, BriefLZ might be an option.\n\n[entropy]: https://en.wikipedia.org/wiki/Entropy_encoding\n[universal]: https://en.wikipedia.org/wiki/Universal_code_(data_compression)\n\n\nBenchmark\n---------\n\nHere are some results from running [lzbench][] on the\n[Silesia compression corpus][silesia] on a Core i5-4570 @ 3.2GHz:\n\n| Compressor name         | Compression| Decompress.|  Compr. size  | Ratio |\n| ---------------         | -----------| -----------| ------------- | ----- |\n| brotli 2019-10-01 -9    |  5.80 MB/s |   432 MB/s |    56,697,015 | 26.75 |\n| zstd 1.4.3 -9           |    29 MB/s |   848 MB/s |    60,185,637 | 28.40 |\n| **brieflz 1.3.0 -9**    |  1.95 MB/s |   415 MB/s |    63,947,751 | 30.17 |\n| zstd 1.4.3 -3           |   199 MB/s |   776 MB/s |    66,681,182 | 31.46 |\n| **brieflz 1.3.0 -6**    |    17 MB/s |   400 MB/s |    67,208,420 | 31.71 |\n| brotli 2019-10-01 -3    |    95 MB/s |   382 MB/s |    67,369,244 | 31.79 |\n| zlib 1.2.11 -9          |    11 MB/s |   320 MB/s |    67,644,548 | 31.92 |\n| zlib 1.2.11 -3          |    63 MB/s |   313 MB/s |    72,967,040 | 34.43 |\n| brotli 2019-10-01 -1    |   220 MB/s |   338 MB/s |    73,499,222 | 34.68 |\n| zstd 1.4.3 -1           |   345 MB/s |   880 MB/s |    73,508,823 | 34.68 |\n| **brieflz 1.3.0 -3**    |    96 MB/s |   369 MB/s |    75,550,736 | 35.65 |\n| zlib 1.2.11 -1          |    91 MB/s |   295 MB/s |    77,259,029 | 36.45 |\n| lz4hc 1.9.2 -9          |    28 MB/s |  3417 MB/s |    77,884,448 | 36.75 |\n| **brieflz 1.3.0 -1**    |   164 MB/s |   362 MB/s |    81,138,803 | 38.28 |\n| lzo1x 2.10 -1           |   531 MB/s |   702 MB/s |   100,572,537 | 47.45 |\n| lz4 1.9.2               |   550 MB/s |  3444 MB/s |   100,880,800 | 47.60 |\n\nPlease note that this benchmark is not entirely fair because BriefLZ has no\nwindow size limit.\n\n[lzbench]: https://github.com/inikep/lzbench\n[silesia]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia\n\n\nUsage\n-----\n\nThe include file `include/brieflz.h` contains documentation in the form of\n[doxygen][] comments. A configuration file is included, so you can simply run\n`doxygen` to generate documentation in HTML format.\n\nIf you wish to compile BriefLZ on 16-bit systems, make sure to adjust the\nconstants `BLZ_HASH_BITS` and `DEFAULT_BLOCK_SIZE`.\n\nWhen using BriefLZ as a shared library (dll on Windows), define `BLZ_DLL`.\nWhen building BriefLZ as a shared library, define both `BLZ_DLL` and\n`BLZ_DLL_EXPORTS`.\n\nThe `example` folder contains a simple command-line program, `blzpack`, that\ncan compress and decompress a file using BriefLZ. For convenience, the example\ncomes with makefiles for GCC and MSVC.\n\nBriefLZ uses [CMake][] to generate build systems. To create one for the tools\non your platform, and build BriefLZ, use something along the lines of:\n\n~~~sh\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\ncmake --build . --config Release\n~~~\n\nYou can also simply compile the source files and link them into your project.\nCMake just provides an easy way to build and test across various platforms and\ntoolsets.\n\n[doxygen]: http://www.doxygen.org/\n[CMake]: http://www.cmake.org/\n\n\nLicense\n-------\n\nThis projected is licensed under the [zlib License](LICENSE) (Zlib).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjibsen%2Fbrieflz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjibsen%2Fbrieflz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjibsen%2Fbrieflz/lists"}