Opened 4 years ago

Closed 3 years ago

#1761 closed defect (fixed)

Port interface in z3 egg

Reported by: Idiomdrottning Owned by:
Priority: minor Milestone: someday
Component: extensions Version: 5.2.0
Keywords: Cc:
Estimated difficulty:

Description

Decoding files work great, but on encoding:

(display "Here is an example document
to see if this thing can work
"

(z3:open-compressed-output-file "/tmp/hello.gz"))

Creates a pretty borked up file that can't be opened.

Change History (1)

comment:1 Changed 3 years ago by Vasilij Schneidermann

Resolution: fixed
Status: newclosed

I've dug into this and found that the z3 port needs to be closed, otherwise the finishing chunk is never written. Here's the correct code snippet:

(let ((out (z3:open-compressed-output-file "/tmp/hello.gz")))
  (display "Here is an example document
to see if this thing can work
" out)
  (close-output-port out))
Note: See TracTickets for help on using tickets.