Re: Guile-zstd 0.1.1 released

"Dr. Arne Babenhauserheide" <[email protected]> Mon, 28 Dec 2020 07:48:29 +0100
Newsgroups gmane.lisp.guile.sources,gmane.comp.gnu.guix.devel,gmane.lisp.guile.user
Message-ID <[email protected]>
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Ludo,

that=E2=80=99s 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=E2=80=99s possible from the libra=
ry):

   (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=C3=A8s <[email protected]> writes:

> Ludovic Court=C3=A8s <[email protected]> skribis:
>
>> I=E2=80=99m pleased to announce the first release of Guile-zstd:
>
> Oops, a file was missing from the repo, so here=E2=80=99s a brand new rel=
ease!
>
>   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=E2=80=99.


=2D-=20
Unpolitisch sein
hei=C3=9Ft politisch sein
ohne es zu merken

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFA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