{"id":21712861,"url":"https://github.com/ije/esar","last_synced_at":"2026-04-01T23:42:21.419Z","repository":{"id":246545320,"uuid":"821363171","full_name":"ije/esar","owner":"ije","description":"Bundle multiple files into a single binary blob.","archived":false,"fork":false,"pushed_at":"2025-06-25T10:48:05.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T19:55:08.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ije.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":"2024-06-28T11:23:01.000Z","updated_at":"2025-06-25T10:48:08.000Z","dependencies_parsed_at":"2024-06-28T16:15:15.896Z","dependency_job_id":"82207fc6-748e-4eee-9b66-881108a93322","html_url":"https://github.com/ije/esar","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"f539c5f8d1d24a6f41a7ba58bd9c9ac6930be173"},"previous_names":["esm-dev/esm-archive","ije/esm-archive","ije/esar"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ije/esar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Fesar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Fesar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Fesar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Fesar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ije","download_url":"https://codeload.github.com/ije/esar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Fesar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31013966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:58:54.984Z","status":"ssl_error","status_checked_at":"2026-03-27T02:58:46.993Z","response_time":164,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-25T23:48:34.103Z","updated_at":"2026-03-27T03:16:53.778Z","avatar_url":"https://github.com/ije.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esar\n\nA tiny library for bundling multiple files into a single binary blob.\n\n```js\nimport { Archive, bundle } from \"esar\";\n// or import from esm.sh in browser\n// import { Archive, bundle } from \"https://esm.sh/esar\";\n\n// bundle some files\nconst data = bundle([\n  new File([\"bar\"], \"foo.txt\", { type: \"text/plain\" }),\n  new File([\"foo\"], \"bar.txt\", { type: \"text/plain\" }),\n]);\n\n// read the archive\nconst archive = new Archive(data);\narchive.checksum; // a 32-bit checksum of the archive\n\nconst entries = archive.entries()\nentries.length; // =\u003e 2\nentries[0].name; // =\u003e \"foo.txt\"\nentries[0].type; // =\u003e \"text/plain\"\nentries[1].name; // =\u003e \"bar.txt\"\nentries[1].type; // =\u003e \"text/plain\"\n\narchive.file(\"foo.txt\"); // =\u003e File([\"bar\"], \"foo.txt\", { type: \"text/plain\" })\narchive.file(\"bar.txt\"); // =\u003e File([\"foo\"], \"bar.txt\", { type: \"text/plain\" })\n```\n\n## Compression\n\nThis library does not compress the archived files. Below is an example of how to use `CompressionStream` to compress data\nwith `gzip` algorithm, and use `DecompressionStream` to decompress the data again.\n\n```js\nimport { Archive, bundle } from \"esar\";\n\nconst data = bundle([/* add some files */]);\n\n// compress and decompress the data\nconst compressed = await readAll(new Blob([data]).stream().pipeThrough(new CompressionStream(\"gzip\")));\nconst decompressed = await readAll(new Blob([compressed]).stream().pipeThrough(new DecompressionStream(\"gzip\")));\n```\n\n\u003e Note that `CompressionStream` and `DecompressionStream` are not supported in all browsers, and you may need to use a\n\u003e polyfill or a different compression algorithm depending on your requirements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fije%2Fesar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fije%2Fesar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fije%2Fesar/lists"}