{"id":22884641,"url":"https://github.com/claudiuhbann/streamable_old","last_synced_at":"2025-03-31T17:44:02.332Z","repository":{"id":189539976,"uuid":"680862473","full_name":"ClaudiuHBann/Streamable_OLD","owner":"ClaudiuHBann","description":"Fast and easy-to-use single-header parser with a simple format for C++20 and NO dependencies.","archived":false,"fork":false,"pushed_at":"2023-08-30T21:05:56.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T22:31:49.675Z","etag":null,"topics":["cpp20","easy-to-use","fast","format","no-dependencies","parser","simple","single-header"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClaudiuHBann.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}},"created_at":"2023-08-20T16:44:02.000Z","updated_at":"2024-09-01T00:18:41.000Z","dependencies_parsed_at":"2024-09-07T21:21:38.332Z","dependency_job_id":null,"html_url":"https://github.com/ClaudiuHBann/Streamable_OLD","commit_stats":null,"previous_names":["claudiuhbann/istream","claudiuhbann/streamable"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiuHBann%2FStreamable_OLD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiuHBann%2FStreamable_OLD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiuHBann%2FStreamable_OLD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiuHBann%2FStreamable_OLD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClaudiuHBann","download_url":"https://codeload.github.com/ClaudiuHBann/Streamable_OLD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246510879,"owners_count":20789433,"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":["cpp20","easy-to-use","fast","format","no-dependencies","parser","simple","single-header"],"created_at":"2024-12-13T19:19:52.877Z","updated_at":"2025-03-31T17:44:02.297Z","avatar_url":"https://github.com/ClaudiuHBann.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streamable\n\nThis library is all about speedy data parsing, churning out super small byte streams.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Features](#features)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Documentation](#documentation)\n- [TODO](#todo)\n\n## Installation\n\nTo use this library, simply get and include the header file `Streamable.hpp` into your project.\n\n## Features\n\n- **fast** - the parsing represents just a simple iteration, knows where every object is and how big it is, for example it reserves the memory for ranges that allow it before adding elements etc...\n- **easy-to-use** - inherit a class and implement it's methods with just a macro\n- **single-header** - just copy paste the file in your project\n- **simple format** - contains just the data itself and for the types that have a dynamic size a metadata representing just a uint32_t\n- **has no dependencies** - uses just the standard library\n- **accepts multiple data types** - beside **itself** ofc, **primitive types** (ex.: bool, unsigned int, double etc...), **strings** (ex.: std::string. std::wstring etc...), **any type with standard layout** (ex.: POD structs and classes, enums, etc...), **nested ranges** (ex.: vector, list, vector\u0026lt;list\u0026gt; etc...), and bonus types like *std::filesystem::path* etc... ( doesn't support pointers... yet :) )\n\n## Usage\n\n1. Inherit from the `IStreamable` class or any class that implements it.\n2. Use one of the macros **ISTREAMABLE_DEFINE_X**\n\nOR\n\n1. Inherit from the `IStreamable` class or any class that implements it.\n2. Implement the `Constructor(stream)` used for deserializing, simply by using the macro ISTREAMABLE_DESERIALIZE_X(object1, object2, ...)\n3. Implement the `ToStream()` method used for serializing, simply by using the macro ISTREAMABLE_SERIALIZE_X(object1, object2, ...)\n4. Implement the `GetObjectsSize` used for calculating the exact size required to store the objects, simply by using the macro ISTREAMABLE_GET_OBJECTS_SIZE_X(object1, object2, ...)\n\n## Examples\n\n- [Simple Class](https://github.com/ClaudiuHBann/Streamable/blob/main/Example%20Simple%20Class.cpp) - how to use **Streamable** for a simple class\n- [Derived Class](https://github.com/ClaudiuHBann/Streamable/blob/main/Example%20Derived%20Class.cpp) - how to use **Streamable** for a base class and a derived class\n- [Derived Classes](https://github.com/ClaudiuHBann/Streamable/blob/main/Example%20Derived%20Class%2B.cpp) - how to use **Streamable** for a base class, multiple intermediate classes and the final class\n\n## Documentation\n\nThere are 3 types of macros:\n- **ISTREAMABLE_GET_OBJECTS_SIZE_X** - finds the exact size required to store the objects\n- **ISTREAMABLE_SERIALIZE_X** - serializes the objects\n- **ISTREAMABLE_DESERIALIZE_X** - deserializes the objects\n\nThose 3 macros have 4 types each that will be used depending on the situation:\n- **ISTREAMABLE_X**(...) - used by simple classes\n- **ISTREAMABLE_X_DERIVED_START**(...) - used by the base classes\n- **ISTREAMABLE_X_DERIVED**(...) - used by the intermediate classes\n- **ISTREAMABLE_X_DERIVED_END**(...) - used by the final classes\n\nBut we are going to use the following macros to define everything in just one line:\n- **ISTREAMABLE_DEFINE**(className, ...) - used by simple classes\n- **ISTREAMABLE_DEFINE_DERIVED_START**(className, ...) - used by the base classes\n- **ISTREAMABLE_DEFINE_DERIVED**(className, baseClass, ...) - used by the intermediate classes\n- **ISTREAMABLE_DEFINE_DERIVED_END**(className, baseClass, ...) - used by the final classes\n\n## TODO\n\nFeatures:\n- make it work with tuples\n\nEnchantments:\n- remove the single copy from the project from ReadStreamable\n- split the class IStreamable into IStreamWriter, IStreamReader, IStreamBase...\n\nBugs:\n- give me some... :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudiuhbann%2Fstreamable_old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaudiuhbann%2Fstreamable_old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudiuhbann%2Fstreamable_old/lists"}