guile-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile-zstd 0.1.1 released


From: Dr. Arne Babenhauserheide
Subject: Re: Guile-zstd 0.1.1 released
Date: Mon, 28 Dec 2020 07:48:29 +0100
User-agent: mu4e 1.4.13; emacs 27.1

Hi Ludo,

that’s pretty cool! Thank you!

Looking at the readme I get the feeling that two little helpers could be
useful:

   (call-with-zstd-output-file "compressed.zstd"
        (lambda (port)
          (define data
            ;; Read the input file in memory.
            (call-with-input-file "input-file.txt"
              get-bytevector-all))

          ;; Write data to PORT.
          (put-bytevector port data)))

  (call-with-zstd-input-file "compressed.zst"
        (lambda (port)
          ;; Read decompressed data from PORT.
          ...))

Potentially with streaming added (if that’s possible from the library):

   (call-with-zstd-output-file "compressed.zstd"
        (lambda (outport)
      (call-with-input-file "input-file.txt"
            (lambda (inport)
          (let loop ((data (get-bytevector-some inport)))
            (when (not (eof-object? data))
              (put-bytevector outport data)
              (loop (get-bytevector-some inport))))))))

Also maybe a minimal representation of the commandline-interface:

   (zstd-compress "input-file.txt" #:output "compressed.zst")
   (zstd-decompress "compressed.zstd" #:output "cleartext-file.zst")

Best wishes,
Arne

Ludovic Courtès <ludo@gnu.org> writes:

> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> I’m pleased to announce the first release of Guile-zstd:
>
> Oops, a file was missing from the repo, so here’s a brand new release!
>
>   git clone https://notabug.org/guile-zstd/guile-zstd
>   cd guile-zstd
>   git checkout v0.1.1  # or f853c8eb81088f8fbf33d38e62cddea9a4984180
>   git tag -v v0.1.1
>
> Ludo’.


-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]