{"id":15355542,"url":"https://github.com/mattipv4/memory-tar-create","last_synced_at":"2025-04-15T06:33:24.176Z","repository":{"id":51389918,"uuid":"274917469","full_name":"MattIPv4/memory-tar-create","owner":"MattIPv4","description":"Create gzipped tar archives in memory and download them as files or base64 strings.","archived":false,"fork":false,"pushed_at":"2023-07-18T22:53:06.000Z","size":73,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:38:06.115Z","etag":null,"topics":["tar","tar-archive","tar-gz","tar-gzip","tarball"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/memory-tar-create","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MattIPv4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"MattIPv4","patreon":"IPv4","open_collective":null,"ko_fi":"MattIPv4","tidelift":null,"custom":"https://paypal.me/MattIPv4Cowley"}},"created_at":"2020-06-25T13:01:54.000Z","updated_at":"2023-07-18T22:48:17.000Z","dependencies_parsed_at":"2024-10-01T12:24:45.222Z","dependency_job_id":"19cfd965-a645-49be-871a-d774a674af00","html_url":"https://github.com/MattIPv4/memory-tar-create","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"MattIPv4/template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fmemory-tar-create","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fmemory-tar-create/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fmemory-tar-create/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fmemory-tar-create/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MattIPv4","download_url":"https://codeload.github.com/MattIPv4/memory-tar-create/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240280958,"owners_count":19776417,"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":["tar","tar-archive","tar-gz","tar-gzip","tarball"],"created_at":"2024-10-01T12:24:42.236Z","updated_at":"2025-02-27T02:31:09.735Z","avatar_url":"https://github.com/MattIPv4.png","language":"JavaScript","funding_links":["https://github.com/sponsors/MattIPv4","https://patreon.com/IPv4","https://ko-fi.com/MattIPv4","https://paypal.me/MattIPv4Cowley"],"categories":[],"sub_categories":[],"readme":"\u003c!-- Source: https://github.com/MattIPv4/template/blob/master/README.md --\u003e\n\n\u003c!-- Title --\u003e\n\u003ch1 align=\"center\" id=\"memory-tar-create\"\u003e\n    memory-tar-create\n\u003c/h1\u003e\n\n\u003c!-- Tag line --\u003e\n\u003ch3 align=\"center\"\u003eCreate gzipped tar archives in memory and download them as files or base64 strings.\u003c/h3\u003e\n\n\u003c!-- Badges --\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://npmjs.com/package/memory-tar-create\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/v/memory-tar-create?style=flat-square\" alt=\"NPM Package\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/users/MattIPv4/sponsorship\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/GitHub%20Sponsors-MattIPv4-blue.svg?style=flat-square\" alt=\"GitHub Sponsors\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://patreon.mattcowley.co.uk/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Patreon-IPv4-blue.svg?style=flat-square\" alt=\"Patreon\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://slack.mattcowley.co.uk/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Slack-MattIPv4-blue.svg?style=flat-square\" alt=\"Slack\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n----\n\n\u003c!-- Content --\u003e\n## Creating a Tar file in memory\n\n```js\nimport Tar from 'memory-tar-create';\n\n// Create your initial tar archive with a file\nconst myTar = new Tar({\n    'test.txt': { contents: 'Hello world' },\n});\n\n// Add some more files to the archive\nmyTar.add({\n    'a.txt': { contents: 'apple' },\n    'b.txt': { contents: 'banana' },\n});\n\n// Add a symlink to the archive\nmyTar.add({\n    'hello.txt': { target: 'test.txt' },\n});\n\n// Remove a file from the archive\nmyTar.remove('a.txt');\n\n// Add a file modified at the start of 2020\nmyTar.add({\n    'old.txt': { contents: 'Old?', modified: new Date(2020, 1, 1, 0, 0, 0, 0) },\n});\n\n// gzip the archive\nconst gzipTar = myTar.gz();\n\n// Get the base64 of the gzipped archive\nconst b64GzippedTar = gzipTar.base64();\n\n// Or, get the base64 string as a shell command for the archive\nconst b64CommandGzippedTar = gzipTar.base64('myTar.tar.gz');\n\n// Or, in a browser, download the archive directly\ngzipTar.download('myTar.tar.gz');\n```\n\n*Logic originally created for [digitalocean/nginxconfig.io](https://github.com/digitalocean/nginxconfig.io).*\n\n\u003c!-- Contributing --\u003e\n## Contributing\n\nContributions are always welcome to this project!\\\nTake a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project.\n\nPlease make sure to follow the existing standards within the project such as code styles, naming conventions and commenting/documentation.\n\nWhen you are ready, simply create a pull request for your contribution and I will review it whenever I can!\n\n### Donating\n\nYou can also help me and the project out by sponsoring me through [GitHub Sponsors](https://github.com/users/MattIPv4/sponsorship) (preferred), contributing through a [donation on PayPal](http://paypal.mattcowley.co.uk/) or by supporting me monthly on my [Patreon page](http://patreon.mattcowley.co.uk/).\n\u003cp\u003e\n    \u003ca href=\"https://github.com/users/MattIPv4/sponsorship\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/GitHub%20Sponsors-MattIPv4-blue.svg?logo=github\u0026logoColor=FFF\u0026style=flat-square\" alt=\"GitHub Sponsors\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://patreon.mattcowley.co.uk/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Patreon-IPv4-blue.svg?logo=patreon\u0026logoColor=F96854\u0026style=flat-square\" alt=\"Patreon\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://paypal.mattcowley.co.uk/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PayPal-Matt%20(IPv4)%20Cowley-blue.svg?logo=paypal\u0026logoColor=00457C\u0026style=flat-square\" alt=\"PayPal\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- Discussion \u0026 Support --\u003e\n## Discussion, Support and Issues\n\nNeed support with this project, have found an issue or want to chat with others about contributing to the project?\n\u003e Please check the project's issues page first for support \u0026 bugs!\n\nNot found what you need here?\n\n* If you have an issue, please create a GitHub issue here to report the situation, include as much detail as you can!\n* _or,_ You can join our Slack workspace to discuss any issue, to get support for the project or to chat with contributors and myself:\n\n\u003ca href=\"http://slack.mattcowley.co.uk/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Slack-MattIPv4-blue.svg?logo=slack\u0026logoColor=blue\u0026style=flat-square\" alt=\"Slack\" height=\"30\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattipv4%2Fmemory-tar-create","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattipv4%2Fmemory-tar-create","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattipv4%2Fmemory-tar-create/lists"}