{"id":15066647,"url":"https://github.com/abdelhak-zaaim/key-value-database","last_synced_at":"2026-02-02T10:16:07.384Z","repository":{"id":257171930,"uuid":"857521186","full_name":"abdelhak-zaaim/key-value-database","owner":"abdelhak-zaaim","description":"Java-based key-value database parser.","archived":false,"fork":false,"pushed_at":"2024-10-12T15:56:41.000Z","size":24,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T02:18:41.549Z","etag":null,"topics":["database","java","key-value"],"latest_commit_sha":null,"homepage":"","language":"Java","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/abdelhak-zaaim.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":"2024-09-14T21:33:50.000Z","updated_at":"2024-12-07T19:12:23.000Z","dependencies_parsed_at":"2024-09-15T05:56:44.192Z","dependency_job_id":"af831011-5eb4-4550-b9d1-1b0f37abae49","html_url":"https://github.com/abdelhak-zaaim/key-value-database","commit_stats":null,"previous_names":["abdelhak-zaaim/key-value-database"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhak-zaaim%2Fkey-value-database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhak-zaaim%2Fkey-value-database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhak-zaaim%2Fkey-value-database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdelhak-zaaim%2Fkey-value-database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdelhak-zaaim","download_url":"https://codeload.github.com/abdelhak-zaaim/key-value-database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991560,"owners_count":21194894,"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":["database","java","key-value"],"created_at":"2024-09-25T01:10:16.094Z","updated_at":"2026-02-02T10:16:02.365Z","avatar_url":"https://github.com/abdelhak-zaaim.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Key-Value Database Parser\n\nThis project is a Java-based key-value database parser. It includes various classes to handle different data types and operations, such as strings, lists, sets, sorted sets, and hashes. The project also includes functionality for handling expiry times and LZF compression.\n\n## Project Structure\n\n- `src/main/java/com/zaaim/kv/db/parser/`\n  - `CommandExecutor.java`: Implements various Redis command executions.\n  - `DbParser.java`: Parses different data types from the database.\n  - `KeyValuePair.java`: Represents a key-value pair with an optional expiry time.\n  - `LZF.java`: Handles LZF compression and decompression.\n\n## Requirements\n\n- Java 21 or higher\n- Maven\n\n## Building the Project\n\nTo build the project, run the following command:\n\n```sh\nmvn clean install\n```\n## Running the Project\nTo run the project, execute the Main class. You can do this from your IDE (e.g., IntelliJ IDEA) or from the command line:\n\n```sh\njava -cp target/your-jar-file.jar com.zaaim.kv.db.Main\n```\n\n## Usage\n# Parsing a Database\nThe DbParser class provides methods to parse different data types from the database. Example usage:\n    \n```java\nDbParser parser = new DbParser();\nparser.readEntry(0); // Reads a string entry\nparser.readEntry(1); // Reads a list entry\n// Add more as needed\n```\n# Handling Key-Value Pairs\nThe KeyValuePair class represents a key-value pair with an optional expiry time. Example usage:\n\n```java\nKeyValuePair kvp = new KeyValuePair();\nkvp.setKey(\"exampleKey\");\nkvp.setValue(\"exampleValue\");\nkvp.setExpiryTime(new Timestamp(System.currentTimeMillis() + 60000)); // Expires in 1 minute\n```\n\n# LZF Compression\nThe LZF class provides methods to compress and decompress data using the LZF algorithm. Example usage:\n\n```java\nbyte[] input = ...; // Your input data\nbyte[] output = new byte[expectedOutputLength];\nLZF.expand(input, 0, output, 0, expectedOutputLength);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelhak-zaaim%2Fkey-value-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdelhak-zaaim%2Fkey-value-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelhak-zaaim%2Fkey-value-database/lists"}