{"id":13466110,"url":"https://github.com/wolkykim/qlibc","last_synced_at":"2025-04-08T13:06:49.207Z","repository":{"id":14710745,"uuid":"17431133","full_name":"wolkykim/qlibc","owner":"wolkykim","description":"qLibc is a simple and yet powerful C library providing generic data structures and algorithms.","archived":false,"fork":false,"pushed_at":"2024-06-01T16:23:59.000Z","size":4536,"stargazers_count":991,"open_issues_count":0,"forks_count":169,"subscribers_count":52,"default_branch":"main","last_synced_at":"2025-04-01T11:05:30.570Z","etag":null,"topics":["c","cplusplus","hashtable","library","linkedlist","qlibc","queue","stack","tree-structure","vector"],"latest_commit_sha":null,"homepage":"http://wolkykim.github.io/qlibc","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wolkykim.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":"2014-03-05T07:06:57.000Z","updated_at":"2025-03-31T14:50:12.000Z","dependencies_parsed_at":"2024-03-26T10:24:15.751Z","dependency_job_id":"4dd78600-526b-4464-9768-9ffdc165374e","html_url":"https://github.com/wolkykim/qlibc","commit_stats":{"total_commits":327,"total_committers":28,"mean_commits":"11.678571428571429","dds":0.2629969418960245,"last_synced_commit":"0ed15e94b39252af2f0241068a5bfeff78e13fa0"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolkykim%2Fqlibc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolkykim%2Fqlibc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolkykim%2Fqlibc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolkykim%2Fqlibc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolkykim","download_url":"https://codeload.github.com/wolkykim/qlibc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247847610,"owners_count":21006100,"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","cplusplus","hashtable","library","linkedlist","qlibc","queue","stack","tree-structure","vector"],"created_at":"2024-07-31T15:00:39.260Z","updated_at":"2025-04-08T13:06:49.174Z","avatar_url":"https://github.com/wolkykim.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"What's qLibc?  [![Actions Status](https://github.com/wolkykim/qlibc/workflows/CI/badge.svg)](https://github.com/wolkykim/qlibc/actions)\n=============\n\nqLibc is currently one of the most functionally-complete, publicly-licensed\nC/C++ libraries. The goal of the qLibc project is to provide a **simple and\npowerful general purpose C/C++ library** that includes all kinds of containers\nand general library routines. It provides a ready-made set of common container\nAPIs with a consistent API look.\n\n## qLibc Copyright\n\nqLibc is published under 2-clause BSD license known as Simplified BSD License.\nPlease refer the LICENSE document included in the package for more details.\n\n## API Reference\n\n* [qlibc Core API Reference](https://wolkykim.github.io/qlibc/doc/html/files.html)\n  * Containers for Key/Value pairs\n    * Tree Table --- in binary tree(left-leaning red-black tree) data structure.\n    * Hash Table --- in hash-based data structure.\n    * Static Hash Table --- in fixed size memory(array/mmapped/shared).\n    * List Table --- in (doubly) linked-list data structure.\n  * Containers for Objects\n    * List --- Doubly Linked List.\n    * Vector --- implements a growable array of elements.\n    * Queue --- FIFO(First In First Out) implementation.\n    * Stack --- LIFO(Last In First Out) implementation.\n  * General utilities.\n    * String --- string trimmer, modifier, replacer, case converter, pattern detectors, ...\n    * I/O --- non-blocking I/O, stream reader/writer, ...\n    * File --- file locking, file/directory hander, path correctors, ...\n    * IPC, Semaphore Shared-memory\n    * En/decoders --- Url en/decoder, Base64 en/decoder, Hex en/decoder, ...\n    * Hashes --- Murmur hases, FNV hases, MD5 hashes, ...\n    * Time --- time diff, time format converstion, ...\n\n* [qLibc Extension API Reference](https://wolkykim.github.io/qlibc/doc/html/files.html)\n  * Apache-style Configuration File Parser.\n  * INI-style Configuration File Parser.\n  * HTTP client.\n  * Rotating File Logger.\n  * Database(MySQL) interface.\n  * [Token-Bucket](https://en.wikipedia.org/wiki/Token_bucket)\n\n## qLibc Tables at a Glance\n\n| Characteristics     | Tree Table   | Hash Table   |Static Hash Table| List Table   |\n|:--------------------|:------------:|:------------:|:---------------:|:------------:|\n| Data structure      | Binary Tree  | Slot Index   | Block Array     | Linked-List  |\n| Search complexity   | O(log n)     | O(1) / O(n)  | O(1) / O(n)     | O(n)         |\n| Insert complexity   | O(log n)     | O(1) / O(n)  | O(1) / O(n)     | O(1)         |\n| Delete complexity   | O(log n)     | O(1) / O(n)  | O(1) / O(n)     | O(n)         |\n| Space complexity    | O(n)         | O(n)         | -               | O(n)         |\n| Space allocation    | Dynamic      | Dynamic      | Pre-allocation  | Dynamic      |\n| Key Stored Sorted   | Yes          | No           | No              | Yes (option) |\n| User comparator     | Supported    | -            | -               | Supported    |\n| Duplicated keys     | No           | No           | No              | Yes (option) |\n| Key stored digested | No           | No           | Yes             | No           |\n| Search Nearest Key  | Yes          | No           | No              | No           |\n| Iterator support    | Yes          | Yes          | Yes             | Yes          |\n| Iterator visit order| min -\u003e max   | random       | random          | insert order |\n| Thread-safe option  | Supported    | Suported     | User            | Supported    |\n| Can use shared mem  | No           | No           | Yes             | No           |\n\n## Consistent API Look\n\nAll container APIs have a consistent look and feel. It basically provides\na creator function which usually returns a pointer to a container structure.\nAlso, **all functions related to the container can be accessed through function\npointers inside of the container** or traditional style direct access APIs.\nFor an example, \n\nSo, regardless of which container you use, you can simply put elements into\na list with `container-\u003eput(container, ...)` or you can call them using\ndirect API like qtreetbl_pub(container, ...).\n\nAn examples below illustrates how it looks like.\n\n~~~{.c}\n  // create a hash-table.\n  qhashtbl_t *tbl = qhashtbl(0, QHASHTBL_THREADSAFE);\n  \n  // add an element which key name is \"score\".\n  int x = 12345;\n  tbl-\u003eput(tbl, \"score\", \u0026x, sizeof(int));\n  \n  // get the value of the element.\n  int *px = tbl-\u003eget(tbl, \"score\", NULL, true);\n  if(px != NULL) {\n    printf(\"%d\\n\", *px);\n    free(px);\n  }\n  \n  // release table\n  tbl-\u003efree(tbl);\n~~~\n\nHere is an identical implementation with a Linked-List-Table container.\nYou may notice that there aren't any code changes at all, except for 1 line\nin the table creation. This is why qLibc encapsulates corresponding function\npointers inside of the container object.\n\n~~~{.c}\n  // create a linked-list-table. THE ONLY LINE YOU NEED TO CHANGE.\n  qlisttbl_t *tbl = qlisttbl(QLISTTBL_THREADSAFE);\n  \n  // add an element which key name is \"score\".\n  int x = 12345;\n  tbl-\u003eput(tbl, \"score\", \u0026x, sizeof(int));\n  \n  // get the value of the element.\n  int *px = tbl-\u003eget(tbl, \"score\", NULL, true);\n  if(px != NULL) {\n    printf(\"%d\\n\", *px);             \n    free(px);\n  }\n  \n  // release table\n  tbl-\u003efree(tbl);\n~~~\n\n## Looking for people to work with.\n\nWe're looking for people who want to work together to develop and improve qLibc.\nCurrently, we have high demands on following areas.\n\n* Automated testing\n* Documentation.\n* New feature implementation.\n\n## Contributors\n\nThe following people have helped with suggestions, ideas, code or fixing bugs:\n(in alphabetical order by first name)\n\n* [Seungyoung \"Steve\" Kim](https://github.com/wolkykim) - Project Lead\n* [Alexandre Lucchesi](https://github.com/alexandrelucchesi)\n* [Anthony Tseng](https://github.com/darkdh)\n* [Carpentier Pierre-Francois](https://github.com/kakwa)\n* Cesar\n* [Colin](https://github.com/colintd)\n* [Charles](https://github.com/Charles0429)\n* [Dmitry Vorobiev](https://github.com/demitsuri)\n* [Fabrice Fontaine](https://github.com/ffontaine)\n* [Fullaxx](https://github.com/Fullaxx)\n* HyoSup Woo\n* [Keith Rosenberg](https://github.com/netpoetica)\n* Krishna\n* [Liu Zhongchao](https://github.com/haveTryTwo)\n* Luis Jimenez\n* Maik Beckmann\n* RQ\n* [Ryan Gonzalez](https://github.com/kirbyfan64)\n* [Stroh Snow](https://github.com/strohsnow)\n* [SunBeau](https://github.com/SunBeau)\n* Umesh\n\nIf we have forgotten or misspelled your name, please let us know.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolkykim%2Fqlibc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolkykim%2Fqlibc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolkykim%2Fqlibc/lists"}