{"id":15653065,"url":"https://github.com/froydnj/archive","last_synced_at":"2026-01-08T10:04:10.041Z","repository":{"id":741465,"uuid":"392336","full_name":"froydnj/archive","owner":"froydnj","description":"A Common Lisp library for reading archive (tar, cpio, etc.) files","archived":false,"fork":false,"pushed_at":"2017-10-10T10:27:56.000Z","size":58,"stargazers_count":30,"open_issues_count":5,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-05T03:22:45.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/froydnj.png","metadata":{"files":{"readme":"README","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":"2009-12-02T03:39:26.000Z","updated_at":"2023-10-31T17:42:57.000Z","dependencies_parsed_at":"2022-07-18T12:31:30.348Z","dependency_job_id":null,"html_url":"https://github.com/froydnj/archive","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froydnj%2Farchive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froydnj%2Farchive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froydnj%2Farchive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froydnj%2Farchive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/froydnj","download_url":"https://codeload.github.com/froydnj/archive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246263898,"owners_count":20749367,"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":[],"created_at":"2024-10-03T12:44:35.984Z","updated_at":"2026-01-08T10:04:10.010Z","avatar_url":"https://github.com/froydnj.png","language":"Common Lisp","readme":"This is the README for ARCHIVE, a package for reading an writing\ndisk-based file archives such as those generated by the 'tar' and 'cpio'\nprograms on Unix.  This package aspires to be a pure Common Lisp\nreplacement for the 'tar' program.\n\nCurrent functionality includes basic extraction from and creation of tar\narchives.  Basic extraction from certain kinds of cpio archives is also\nsupported.\n\nASDF packaging is provided; (asdf:oos 'asdf:load-op :archive) should be\nall you need to get started.  Once you have the system loaded, you can\ntry the following small example, which replicates the functionality of\n'tar tf':\n\n(defun list-archive-entries (pathname)\n  (archive:with-open-archive (archive pathname :direction :input)\n    (archive:do-archive-entries (entry archive)\n      (format t \"~A~%\" (archive:name entry)))))\n\nAccess to the data for individual entries is also provided.\nENTRY-STREAM returns a stream that provides access to the raw bytes of\ndata for the entry.  If you want to access it as text, you need to use a\nlibrary to encode the bytes into characters, or wrap the stream using\nEdi Weitz's FLEXI-STREAMS.  The following example prints out the first\nline of every file in the archive (assuming that the entry is a text\nfile, of course):\n\n(defun first-line-of-archive-entries (pathname)\n  (archive:with-open-archive (archive pathname :direction :input)\n    (archive:do-archive-entries (entry archive)\n      (when (archive:entry-regular-file-p entry)\n        (let ((stream (flexi-streams:make-flexi-stream (entry-stream entry))))\n          (format t \"~A~%\" (read-line stream)))))))\n\nAnother thing to do is create archives:\n\n;;; This function is actually included in ARCHIVE.\n(defun create-tar-file (pathname filelist)\n  (archive:with-open-archive (archive pathname :direction :output\n                                      :if-exists :supersede)\n    (dolist (file filelist (archive:finalize-archive archive))\n      (let ((entry (archive:create-entry-from-pathname archive file)))\n        (archive:write-entry-to-archive archive entry)))))\n\nNote that you need to call FINALIZE-ARCHIVE once you are done adding\nentries.\n\nComments, criticisms, additions, and optimizations are welcome at the\nbelow email address.\n\nNathan Froyd\nfroydnj@gmail.com\n","funding_links":[],"categories":["Online editors ##"],"sub_categories":["Third-party APIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroydnj%2Farchive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffroydnj%2Farchive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroydnj%2Farchive/lists"}