{"id":18053757,"url":"https://github.com/hymkor/zar","last_synced_at":"2025-04-05T08:21:26.090Z","repository":{"id":44677498,"uuid":"352085333","full_name":"hymkor/zar","owner":"hymkor","description":"tarlike zipclone","archived":false,"fork":false,"pushed_at":"2023-01-11T02:48:36.000Z","size":90,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T15:50:57.597Z","etag":null,"topics":["go","golang","golang-application","golang-tools","tar","zip"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hymkor.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}},"created_at":"2021-03-27T13:53:37.000Z","updated_at":"2024-05-21T22:04:02.000Z","dependencies_parsed_at":"2023-02-08T23:30:41.492Z","dependency_job_id":null,"html_url":"https://github.com/hymkor/zar","commit_stats":null,"previous_names":["zetamatta/zar"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fzar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fzar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fzar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fzar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hymkor","download_url":"https://codeload.github.com/hymkor/zar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247307328,"owners_count":20917448,"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":["go","golang","golang-application","golang-tools","tar","zip"],"created_at":"2024-10-31T00:07:55.002Z","updated_at":"2025-04-05T08:21:25.746Z","avatar_url":"https://github.com/hymkor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"zar\r\n===\r\n\r\n`zar` is the zip-clone with tar-interface.\r\n\r\n[Download binaries](https://github.com/hymkor/zar/releases)\r\n( To install with scoop-installer, type `scoop install https://raw.githubusercontent.com/hymkor/zar/master/zar.json` )\r\n\r\nMotivation\r\n----------\r\n\r\n- I often forget `-r` option on the native zip-interface\r\n    - I prefer the tar-interface. But my colleagues do not know tar-archives. I have to use zip-archives.\r\n- I want to know the filenames are encoded by UTF8 or not ?\r\n    - The fifth field of the output that `zar tvf` indicates the encoding of the filename.\r\n        - `U` ... UTF8\r\n        - `A` ... NonUTF8(ANSI)\r\n- Are The files contained correctly ?\r\n    - `zar --md5 -tvf` show md5 checksum of contained files\r\n    - `zar --sha1 -tvf` show sha1 checksum of contained files\r\n    - `zar --sha256 -tvf` show sha256 checksum of contained files\r\n\r\n```\r\n$ zar --md5 -tvf zar-noversion-linux-amd64.zip\r\nb52fa7c45800545279d3a8264484386b -rw-rw-rw-  694516 2021/10/23 00:28 U zar\r\n```\r\n\r\nCreate an archive\r\n-----------------\r\n\r\n- `zar cvf ARCHIVE.zip [files...]`\r\n- `zar cvf - [files...] \u003e ARCHIVE.ZIP`\r\n\r\nThe filename encoding is always set as UTF8.\r\n\r\n### Option\r\n\r\n- `--remove-files` removes files from disk after adding them to the archive.\r\n- `-C DIRECTORY` change directory\r\n\r\nList an archive\r\n----------------\r\n\r\n- `zar tvf ARCHIVE.zip [files...]`  \r\n- `zar tvf - [files...] \u003c ARCHIVE.ZIP` \\*\r\n\r\n### Option\r\n\r\n- `--md5` show MD5SUMs of contained files\r\n\r\nExtract an archive:\r\n-------------------\r\n\r\n- `zar xvf ARCHIVE.zip [files...]`  \r\n- `zar xvf - [files...] \u003c ARCHIVE.ZIP` \\*\r\n\r\n---\r\n\r\n- Reading the archive file from STDIN is slow because the ZIP file has the file list in the tail of the archive and we have to make a temporary file to access randomly.\r\n- By golang's \"archive/zip\" package.\r\n\r\n![](./demo.png)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhymkor%2Fzar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhymkor%2Fzar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhymkor%2Fzar/lists"}