{"id":22316883,"url":"https://github.com/somecho/string-compressor-service","last_synced_at":"2026-05-04T04:31:31.216Z","repository":{"id":202939453,"uuid":"708461734","full_name":"somecho/string-compressor-service","owner":"somecho","description":"A string compressor web service","archived":false,"fork":false,"pushed_at":"2023-10-22T18:33:05.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T03:29:33.132Z","etag":null,"topics":["compression","docker","string","web-service"],"latest_commit_sha":null,"homepage":"https://string-compressor.onrender.com","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/somecho.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":"2023-10-22T16:25:19.000Z","updated_at":"2023-11-04T11:12:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba983473-e664-414a-8e8d-ab3e5abcf35e","html_url":"https://github.com/somecho/string-compressor-service","commit_stats":null,"previous_names":["somecho/string-compressor-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/somecho/string-compressor-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somecho%2Fstring-compressor-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somecho%2Fstring-compressor-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somecho%2Fstring-compressor-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somecho%2Fstring-compressor-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somecho","download_url":"https://codeload.github.com/somecho/string-compressor-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somecho%2Fstring-compressor-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32595055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["compression","docker","string","web-service"],"created_at":"2024-12-03T23:08:10.930Z","updated_at":"2026-05-04T04:31:31.211Z","avatar_url":"https://github.com/somecho.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String Compressor Service\n\nA simple web application that compresses strings as base64 encoded bytes. \n\n## Usage\n\n| Endpoint | Method | Description |\n|-|-|-|\n| `/algorithms` | `GET` | return a list of compression algorithms used by the service |\n| `/compress` | `POST` | post a string to get back the compressed base64 encoding |\n| `/decompress` | `POST` | post a base64 encoding to get back the decompressed string |\n\n### Compress / Decompress \n\nBoth endpoints have a required URL query param `algorithm`. The `Content-Type` must be set to `text/plain` in the header. The available algorithms are:\n- lzma\n- gz\n- bzip2\n- snappy-framed\n- deflate\n- lz4-frame\n- xz\n\n```sh\n curl https://string-compressor.onrender.com/compress\\?algorithm=deflate -X POST -H \"Content-Type: text/plain\" -d \"abc\"\n```\n\n## Gotcha's\n\nThe service is hosted as a free-tier Render webservice. If, despite using the API properly, you get `Internal server error`, it's because the webservice has run out of memory. Try again with a different algorithm. \n\n## Running Locally\nRun these commands in the project root.\n### Clojure\n```sh\nclojure -M -m service\n```\n### Docker\nYou can build the image locally with `docker build .` and running the service. If you are not familiar with Docker, here's an example workflow:\n```sh\ndocker build -t compression-service .\n# wait for image to be done building\ndocker run -p 3000:3000 -d --rm compression-service\n```\n\nThe webservice in both cases listens to port `3000`.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomecho%2Fstring-compressor-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomecho%2Fstring-compressor-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomecho%2Fstring-compressor-service/lists"}