{"id":17724772,"url":"https://github.com/jibsen/bcrush","last_synced_at":"2025-03-14T05:32:07.406Z","repository":{"id":72894951,"uuid":"156396484","full_name":"jibsen/bcrush","owner":"jibsen","description":"Example of CRUSH compression with optimal parsing using BriefLZ algorithms","archived":false,"fork":false,"pushed_at":"2023-11-01T08:12:05.000Z","size":46,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-11-01T09:26:38.177Z","etag":null,"topics":["c","compression","compression-algorithm","crush"],"latest_commit_sha":null,"homepage":"","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":null,"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":"2018-11-06T14:30:57.000Z","updated_at":"2023-11-01T08:12:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdfdd95b-e3fc-4536-bc7a-202f382716f0","html_url":"https://github.com/jibsen/bcrush","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbcrush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbcrush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbcrush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jibsen%2Fbcrush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jibsen","download_url":"https://codeload.github.com/jibsen/bcrush/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532517,"owners_count":20306151,"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","crush"],"created_at":"2024-10-25T15:48:43.965Z","updated_at":"2025-03-14T05:32:07.147Z","avatar_url":"https://github.com/jibsen.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nbcrush\n======\n\n[![Meson CI](https://github.com/jibsen/bcrush/workflows/Meson%20CI/badge.svg)](https://github.com/jibsen/bcrush/actions)\n\nAbout\n-----\n\nThis is an example using some of the compression algorithms from [BriefLZ][]\nto produce output in the format of [CRUSH][] by Ilya Muravyov.\n\n**Please note:** this is just a quick experiment to see how it would work, it\nis not production quality, and has not been properly tested.\n\n[BriefLZ]: https://github.com/jibsen/brieflz\n[CRUSH]: https://sourceforge.net/projects/crush/\n\n\nBenchmark\n---------\n\nHere are some results on the [Silesia compression corpus][silesia]:\n\n| File    |   Original | `bcrush --optimal` | `crush cx` | `crushx -9` |\n| :------ | ---------: | -----------------: | ---------: | ----------: |\n| dickens | 10.192.446 |          3.148.963 |  3.350.093 |   3.343.930 |\n| mozilla | 51.220.480 |         18.037.611 | 18.760.573 |  18.281.301 |\n| mr      |  9.970.564 |          3.367.533 |  3.532.785 |   3.428.968 |\n| nci     | 33.553.445 |          2.407.286 |  2.624.037 |   2.750.658 |\n| ooffice |  6.152.192 |          2.832.224 |  2.958.518 |   2.871.884 |\n| osdb    | 10.085.684 |          3.424.687 |  3.545.632 |   3.457.335 |\n| reymont |  6.627.202 |          1.523.547 |  1.644.701 |   1.610.306 |\n| samba   | 21.606.400 |          4.720.964 |  4.912.141 |   4.911.613 |\n| sao     |  7.251.944 |          5.344.713 |  5.472.035 |   5.368.466 |\n| webster | 41.458.703 |          9.766.251 | 10.430.228 |  10.322.130 |\n| xml     |  5.345.280 |            535.316 |    563.744 |     561.118 |\n| x-ray   |  8.474.240 |          5.717.405 |  5.958.603 |   5.747.141 |\n\nWhere crush is the original CRUSH v1.00, and crushx is an implementation of\ncrush with optimal parsing [posted][crushx] on Encode's Forum.\n\n[silesia]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia\n[crushx]: https://encode.su/threads/2578-crush-v1-1\n\n\nUsage\n-----\n\nbcrush uses [Meson][] to generate build systems. To create one for the tools on\nyour platform, and build bcrush, use something along the lines of:\n\n~~~sh\nmkdir build\ncd build\nmeson ..\nninja\n~~~\n\nYou can also simply compile and link the source files.\n\nbcrush includes the leparse and btparse algorithms from BriefLZ, which gives\ncompression levels `-5` to `-9` and the **very** slow `--optimal`.\n\n[Meson]: https://mesonbuild.com/\n\n\nNotes\n-----\n\n  - The CRUSH format does not store the size of the compressed block, so I\n    copied the way the CRUSH depacker reads one byte at a time from the file\n    to avoid issues with reading the next block into memory.\n  - bcrush only hashes 3 bytes to find matches, which makes it slow on files\n    with many small matches. It might benefit from using two hash tables like\n    CRUSH.\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%2Fbcrush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjibsen%2Fbcrush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjibsen%2Fbcrush/lists"}