{"id":18189866,"url":"https://github.com/bmedicke/power_of_2_decode","last_synced_at":"2026-05-18T09:36:54.949Z","repository":{"id":141460916,"uuid":"108301562","full_name":"bmedicke/power_of_2_decode","owner":"bmedicke","description":"decode text encoded with ascii * 2^0 to 2^8","archived":false,"fork":false,"pushed_at":"2017-11-22T10:03:07.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T14:49:29.298Z","etag":null,"topics":["c","c99","doxygen","klib","make","makefile","python","valgrind"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmedicke.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-10-25T17:18:19.000Z","updated_at":"2021-05-09T14:56:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"8073f90e-68ef-41fb-84ed-693769307922","html_url":"https://github.com/bmedicke/power_of_2_decode","commit_stats":{"total_commits":131,"total_committers":1,"mean_commits":131.0,"dds":0.0,"last_synced_commit":"98d3c0f786950a6d9c3e0bc9a7e0c5b706bfd7e5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmedicke/power_of_2_decode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmedicke%2Fpower_of_2_decode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmedicke%2Fpower_of_2_decode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmedicke%2Fpower_of_2_decode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmedicke%2Fpower_of_2_decode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmedicke","download_url":"https://codeload.github.com/bmedicke/power_of_2_decode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmedicke%2Fpower_of_2_decode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269317236,"owners_count":24396846,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","c99","doxygen","klib","make","makefile","python","valgrind"],"created_at":"2024-11-03T04:04:20.460Z","updated_at":"2026-05-18T09:36:49.912Z","avatar_url":"https://github.com/bmedicke.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# readme\n\n# usage\n\nSee `decode -h`.\n\n# notes on compiling\n\n- Tested with [clang](https://clang.llvm.org) and [gcc](https://gcc.gnu.org).\n- Tested on macos 10.13 and Arch Linux 4.13.\n- Uses the C99 standard (for `_Bool`).\n- Edit the `Makefile` to change settings.\n\n## make commands\n\n### make all\n\nCompile everything that's out of date. The default compiler is `clang`.\n\n### make clean\n\nRemove all binaries, object files and other output files.\n\n### make run\n\nRuns the command with the default settings.\n\n### make verbose\n\nRuns the command with default settings plus enable verbose output.\n\n### make help\n\nShow the help text.\n\n### make format\n\nFormat all source files and shows changes via a git diff to make individual decisions. Requires [astyle](http://astyle.sourceforge.net) and [git](http://git.com).\n\n### make link\n\nCreate a symlink pointing to the binary. Default target is `/usr/local/bin`.\n\n### make watch\n\nWatches the source files for changes, recompiles and runs the binaries as necessary. Requires [hr](https://github.com/LuRsT/hr) and [entr](https://github.com/clibs/entr).\n\n### make doc\n\nWatches source and markdown files for changes, regenerates the documentation with Doxygen. Requires [doxygen](http://www.stack.nl/~dimitri/doxygen/) and [entr](https://github.com/clibs/entr).\n\n### make report\n\nRun to detect memory leaks. Removes PID from the `report` file to allow proper usage of `git diff`. Requires [Valgrind](http://valgrind.org) and `sponge` from the [moreutils](https://joeyh.name/code/moreutils/).\n\n# used third party libraries\n\nAll code not written by me is in the `vendor` folder.\n\n- [klib](https://github.com/attractivechaos/klib), MIT licensed\n  - specifically `khash.h` for a hash map storing the count of the occurrences for the decoded words.\n  - reasoning: fast, single file (header only), independent libraries; used in big projects (e.g. [Neovim](https://github.com/neovim/neovim))\n\n# useful links and notes\n\n## C\n\n- [warning: function declaration isn't a prototype](https://stackoverflow.com/questions/42125/function-declaration-isnt-a-prototype)\n  - fixes `warning: this function declaration is not a prototype`\n  - `void func()` takes an arbitrary number of arguments, use `void func(void)` for 0 arguments\n  - __This is different to C++ which uses `void func()` for functions with 0 arguments!__\n- [implicit conversions](http://localdoc.scusa.lsu.edu/cppreference/en/c/language/conversion.html)\n- [return value of malloc](https://stackoverflow.com/questions/3585847/return-value-of-malloc)\n  - __No cast is needed on `malloc()` in C; however, it is in C++!__\n- [Uninitialised value was created by a stack allocation valgrind C](https://stackoverflow.com/questions/24727764/uninitialised-value-was-created-by-a-stack-allocation-valgrind-c)\n\n## IDE\n\nget header search path for clang:\n\n```sh\necho | clang -v -E -x c -\n```\nadd paths to `.ycm_extra_conf.py`.\n\n- [YouCompleteMe, header files](https://stackoverflow.com/questions/24438211/youcompleteme-header-files)\n- [macOS c std lib completion and brew python problem](https://github.com/Valloric/YouCompleteMe/issues/2268)\n\n\n## doxygen\n\n- [Doxygen usage examples (for C)](http://fnch.users.sourceforge.net/doxygen_c.html)\n- [How to make an introduction page with Doxygen](https://stackoverflow.com/questions/9502426/how-to-make-an-introduction-page-with-doxygen)\n\n## klib\n\n- [Implementing Generic Hash Library in C](https://attractivechaos.wordpress.com/2008/09/02/implementing-generic-hash-library-in-c/)\n- [khash.h documentation (very outdated)](http://samtools.sourceforge.net/samtools/khash/index.html)\n\n- [examples from the /test directory](https://github.com/attractivechaos/klib/tree/master/test)\n\n\n# error handling\n\n- input file characters not exclusively ones and zeroes\n- input file characters outside the defined ASCII range (A-Z + space)\n- input file characters not resolvable\n- any file not writeable (chowned by root)\n\n\n## known limitations\n\n- can't handle words longer than `MAXWORDSIZE` defined in `helpers.c`\n- order of words with same count is semi-random (based on hash table)\n- assumes there's enough memory available to store entire decoded file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmedicke%2Fpower_of_2_decode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmedicke%2Fpower_of_2_decode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmedicke%2Fpower_of_2_decode/lists"}