Skip to content

Instantly share code, notes, and snippets.

@fukamachi
Last active May 8, 2022 03:04

Revisions

  1. fukamachi revised this gist Aug 28, 2013. No changes.
  2. fukamachi revised this gist Aug 28, 2013. No changes.
  3. fukamachi revised this gist Aug 28, 2013. No changes.
  4. fukamachi revised this gist Aug 28, 2013. No changes.
  5. fukamachi created this gist Aug 28, 2013.
    11 changes: 11 additions & 0 deletions gistfile1.lisp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    (ql:quickload '(chipz archive))

    (defun extract-tarball (pathname)
    "Extract a tarball (.tar.gz) file to a directory (*default-pathname-defaults*)."
    (with-open-file (tarball-stream pathname
    :direction :input
    :element-type '(unsigned-byte 8))
    (archive::extract-files-from-archive
    (archive:open-archive 'archive:tar-archive
    (chipz:make-decompressing-stream 'chipz:gzip tarball-stream)
    :direction :input))))