{"id":28222959,"url":"https://github.com/dreamycecil/vdf","last_synced_at":"2025-06-11T18:30:23.100Z","repository":{"id":292668990,"uuid":"979665595","full_name":"DreamyCecil/VDF","owner":"DreamyCecil","description":"Simple public domain VDF/KeyValues reader \u0026 writer in ANSI C.","archived":false,"fork":false,"pushed_at":"2025-05-19T09:50:22.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T10:44:15.160Z","etag":null,"topics":["ansi-c","c89","c90","keyvalue","keyvalues","parser","reader","reader-writer","valve-data-format","vdf","vdf-files","vdf-format","vdf-parser","writer"],"latest_commit_sha":null,"homepage":"","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/DreamyCecil.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,"zenodo":null}},"created_at":"2025-05-07T21:55:29.000Z","updated_at":"2025-05-19T09:50:26.000Z","dependencies_parsed_at":"2025-05-11T13:39:21.475Z","dependency_job_id":"8434e3c9-fa45-4680-ac6c-5a9a13771b6c","html_url":"https://github.com/DreamyCecil/VDF","commit_stats":null,"previous_names":["dreamycecil/vdf"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DreamyCecil/VDF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DreamyCecil%2FVDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DreamyCecil%2FVDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DreamyCecil%2FVDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DreamyCecil%2FVDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DreamyCecil","download_url":"https://codeload.github.com/DreamyCecil/VDF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DreamyCecil%2FVDF/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259316554,"owners_count":22839521,"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":["ansi-c","c89","c90","keyvalue","keyvalues","parser","reader","reader-writer","valve-data-format","vdf","vdf-files","vdf-format","vdf-parser","writer"],"created_at":"2025-05-18T07:14:29.345Z","updated_at":"2025-06-11T18:30:23.086Z","avatar_url":"https://github.com/DreamyCecil.png","language":"C","readme":"# VDF\n\nThis is a simple reader/writer of [Valve Data Format (a.k.a. KeyValues)](https://developer.valvesoftware.com/wiki/KeyValues) written in ANSI C.\n\nThis library was made as a sort of an exercise in C, since I mainly use C++.\n\nHopefully no memory leaks! But if there still are, feel free to submit an issue or a pull request.  \nI tried making sure that all allocated memory was fully and properly freed before program termination.\n\nSee [`DOCUMENTATION.md`](DOCUMENTATION.md) file for more information.\n\n# Features\n\n### Reading from character buffers \u0026 files\n- Character buffers may be null-terminated or limited to a maximum size.\n- The files are parsed using `fopen()` with `\"rb\"` and reading the contents into a character buffer.\n- The ability to create versatile contexts for reading data in a specific way, as well as functions for quick one-line parsing.\n\n### Writing into character buffers \u0026 files\n- Character buffers are created and expanded by the specified step size on the fly, without having to do it manually.\n- The files are written using `fopen()` with `\"w\"` in order to insert platform-specific line breaks.\n\n### Other\n- Keys and string values of any length.\n- Support for CPP-styled single-line comments (`//`) and C-styled block comments (`/* */`).\n- Context flags for toggling specific features:\n  - Support for escape sequences in strings (**ON** by default).\n  - Support for multiple values under the same key name (**ON** by default).\n  - Value replacement in duplicate keys, if multi-key support is disabled (**ON** by default).\n- Case-insensitive `#base` \u0026 `#include` macro support that includes files from absolute paths or relative to the specified base directory.\n  - The behavior of each inclusion macro is identical to Source SDK 2013.\n  - Context flags for multi-key support and value replacement in duplicate keys are ignored when merging pairs using `#base` due to its unique behavior.\n\n### Currently not supported\n- Conditional statements before the pairs, e.g. `[$WIN32] \"key\" \"value\"`.\n- Non-ASCII encodings.\n\n# How to use\n\n1. Include `keyvalues.c` in your project or link the library in your CMake project using `CMakeLists.txt`.\n2. Include `keyvalues.h` in your C/C++ code.\n\nSample code with usage examples can be found [here](samples).\n\n# License\n\nThis library is in the public domain. That means you can do absolutely anything you want with it, although I appreciate attribution.\n\nIt's also licensed under the MIT license, in case public domain doesn't work for you. Every source file includes an explicit dual-license for you to choose from.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamycecil%2Fvdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamycecil%2Fvdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamycecil%2Fvdf/lists"}