{"id":29224764,"url":"https://github.com/DKMFzF/archiver-huffman-api","last_synced_at":"2025-07-03T06:07:55.495Z","repository":{"id":302251440,"uuid":"1011671528","full_name":"DKMFzF/archiver-huffman-api-nodejs-and-wasm-bundle","owner":"DKMFzF","description":"Archiver for file compression","archived":false,"fork":false,"pushed_at":"2025-07-02T21:33:03.000Z","size":8672,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T22:29:33.064Z","etag":null,"topics":["api","archiver","c","cpp","docker","express","rest","ts","wasm"],"latest_commit_sha":null,"homepage":"","language":"WebAssembly","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/DKMFzF.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,"zenodo":null}},"created_at":"2025-07-01T07:08:42.000Z","updated_at":"2025-07-02T21:33:06.000Z","dependencies_parsed_at":"2025-07-02T22:39:42.484Z","dependency_job_id":null,"html_url":"https://github.com/DKMFzF/archiver-huffman-api-nodejs-and-wasm-bundle","commit_stats":null,"previous_names":["dkmfzf/archiver-rest-api","dkmfzf/archiver-hufman-api","dkmfzf/archiver","dkmfzf/archiver-huffman-api-nodejs-and-wasm-bundle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DKMFzF/archiver-huffman-api-nodejs-and-wasm-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKMFzF%2Farchiver-huffman-api-nodejs-and-wasm-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKMFzF%2Farchiver-huffman-api-nodejs-and-wasm-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKMFzF%2Farchiver-huffman-api-nodejs-and-wasm-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKMFzF%2Farchiver-huffman-api-nodejs-and-wasm-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DKMFzF","download_url":"https://codeload.github.com/DKMFzF/archiver-huffman-api-nodejs-and-wasm-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKMFzF%2Farchiver-huffman-api-nodejs-and-wasm-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263271499,"owners_count":23440396,"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":["api","archiver","c","cpp","docker","express","rest","ts","wasm"],"created_at":"2025-07-03T06:07:54.682Z","updated_at":"2025-07-03T06:07:55.343Z","avatar_url":"https://github.com/DKMFzF.png","language":"WebAssembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Archiver Huffman API\r\n\r\nThe API provides file compression and decompression functionality using a custom Huffman coding algorithm implemented in C++ with a Node.js interface.\r\n\r\n## Table of Contents\r\n\r\n- [Quick launch](#quick-launch)\r\n- [Tech stack](#tech-stack)\r\n- [API Endpoints](#api-endpoints)\r\n- [Request/Response Examples](#requestresponse-examples)\r\n- [Error Handling](#error-handling)\r\n- [Documentation for Core](./src/core/README.md)\r\n\r\n## Quick launch\r\n\r\nTo start, you need to install the dependencies\r\n\r\n```bash\r\nnpm i | yarn\r\n```\r\n\r\nAfter installing the dependencies, you need to build the project.\r\n\r\n```bash\r\nnpm run build | yarn build\r\n```\r\n\r\nAfter that, you need to reset the program core.\r\n\r\n***To do this, you need to have cmake and makefile in global dependencies.*** If these dependencies are not present, follow the link and follow the assembly [instructions](./src/core/README.md).\r\n\r\n```bash\r\nchmod +x ./core-build.sh\r\n./core-build.sh\r\n```\r\n\r\nThen run the startup script\r\n\r\n```bash\r\nnpm start | yarn start\r\n```\r\n\r\n## Tech stack\r\n\r\n- Node.js + Express\r\n- TypeScript\r\n- C\r\n- C++\r\n\r\n## API Endpoints\r\n\r\n### Compress File\r\n`POST /compress`\r\n\r\n**Request:**\r\n- Content-Type: `multipart/form-data`\r\n- Body: File upload with field name `file`\r\n\r\n**Response:**\r\n- Success: Binary file with `.huff` extension\r\n- Error: JSON with error details\r\n\r\n### Decompress File\r\n`POST /decompress`\r\n\r\n**Request:**\r\n- Content-Type: `multipart/form-data`\r\n- Body: `.huff` file upload with field name `file`\r\n\r\n**Response:**\r\n- Success: Original uncompressed file\r\n- Error: JSON with error details\r\n\r\n## Request/Response Examples\r\n\r\n### Compression Request\r\n```http\r\nPOST /compress HTTP/1.1\r\nHost: localhost:3000\r\nContent-Type: multipart/form-data; boundary=multipart/form-data\r\n\r\nContent-Disposition: form-data; name=\"file\"; filename=\"document.txt\"\r\nContent-Type: text/plain\r\n\r\n\u003cfile content here\u003e\r\n```\r\n\r\n## Successful Response\r\n\r\n```http\r\nHTTP/1.1 200 OK\r\nContent-Disposition: attachment; filename=\"document.txt.huff\"\r\nContent-Type: application/octet-stream\r\n\r\n\u003ccompressed binary data\u003e\r\n```\r\n\r\n## Error Response\r\n\r\n```json\r\n{\r\n  \"error\": \"No file uploaded\",\r\n  \"details\": \"Request must include a file\"\r\n}\r\n```\r\n\r\n## License\r\n\r\nThis software is distributed under the MIT license\r\n\r\n## Author\r\n\r\n- [Dkmfzf](https://github.com/DKMFzF)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDKMFzF%2Farchiver-huffman-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDKMFzF%2Farchiver-huffman-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDKMFzF%2Farchiver-huffman-api/lists"}