Commit Graph

18 Commits

Author SHA1 Message Date
dyb
82b2cda639 compress-level parameter, improvement in lz4 compression, and various other related improvements
- added compress-level parameter to select a compression level for
  file writing and changed the default for lz4 compression to do a
  better job compressing.  finished splitting glz input routines
  apart from glz output routines and did a bit of other restructuring.
  removed gzxfile struct-as-bytevector wrapper and moved its fd
  into glzFile.  moved DEACTIVATE to before glzdopen_input calls
  in S_new_open_input_fd and S_compress_input_fd, since glzdopen_input
  reads from the file and could block.  the compress format and now
  level are now recorded directly the thread context.  replaced
  as-gz? flag bit in compressed bytevector header word with a small
  number of bits recording the compression format at the bottom of
  the header word.  flushed a couple of bytevector compression mats
  that depended on the old representation.  (these last few changes
  should make adding new compression formats easier.)  added
  s-directory build options to choose whether to compress and, if
  so, the format and level.
    compress-io.h, compress-io.c, new-io.c, equates.h, system.h,
    scheme.c, gc.c,
    io.ss, cmacros.ss, back.ss, bytevector.ss, primdata.ss, s/Mf-base,
    io.ms, mat.ss, bytevector.ms, root-experr*,
    release_notes.stex, io.stex, system.stex, objects.stex
- improved the effectiveness of LZ4 boot-file compression to within
  15% of gzip by increasing the lz4 output-port in_buffer size to
  1<<18.  With the previous size (1<<14) LZ4-compressed boot files
  were about 50% larger.  set the lz4 input-port in_buffer and
  out_buffer sizes to 1<<12 and 1<<14.  there's no clear win at
  present for larger input-port buffer sizes.
    compress-io.c
- To reduce the memory hit for the increased output-port in_buffer
  size and the corresponding increase in computed out_buffer size,
  one output-side out_buffer is now allocated (lazily) per thread
  and stored in the thread context.  The other buffers are now
  directly a part of the lz4File_out and lz4File_in structures
  rather than allocated separately.
    compress-io.c, scheme.c, gc.c,
    cmacros.ss
- split out the buffer emit code from glzwrite_lz4 into a
  separate glzemit_lz4 helper that is now also used by gzclose
  so we can avoid dealing with a NULL buffer in glzwrite_lz4.
  glzwrite_lz4 also uses it to writing large buffers directly and
  avoid the memcpy.
    compress-io.c
- replaced lz4File_out and lz4File_in mode enumeration with the
  compress format and inputp boolean.  using switch to check and
  raising exceptions for unexpected values to further simplify
  adding new compression formats in the future.
    compress-io.c
- replaced the never-defined struct lz4File pointer in glzFile
  union with the more specific struct lz4File_in_r and Lz4File_out_r
  pointers.
    compress-io.h, compress-io.c
- added free of lz4 structures to gzclose.  also changed file-close
  logic generally so that (1) port is marked closed before anything is
  freed to avoid dangling pointers in the case of an interrupt or
  error, and (2) structures are freed even in the case of a write
  or close error, before the error is reported.  also now mallocing
  glz and lz4 structures after possibility of errors have passed where
  possible and freeing them when not.
    compress-io.c,
    io.ss
- added return-value checks to malloc calls and to a couple of other
  C-library calls.
    compress-io.c
- corrected EINTR checks to look at errno rather than return codes.
    compress-io.c
- added S_ prefixes to the glz* exports
    externs.h, compress-io.c, new-io.c, scheme.c, fasl.c
- added entries for mutex-name and mutex-thread
    threads.stex

original commit: 722ffabef4c938bc92c0fe07f789a9ba350dc6c6
2019-04-18 05:47:19 -07:00
Matthew Flatt
e622a495b6 Add LZ4 support and use it by default for compressing files
original commit: 8858b34bd92ac8d2b6511dc9ca17ebfa06a1bd93
2019-04-06 07:32:37 +02:00
dyb
530882e379 addressed small portions of github issues #278 and #353:
updated descriptions of standard-input-port and standard-output-port;
fixed a missing "and" in the description of utf-16-codec,

original commit: a5db479b68b74dda9f62665c44cfad2b1baf322e
2018-10-22 19:29:30 -07:00
R. Kent Dybvig
b0abacbb55 Merge pull request #354 from goober99/hacktoberfest
Fixed typos pointed out in #353
original commit: fad29dbdf9f305abd6d1a7e4609bf96b251b47bc
2018-10-22 19:20:20 -07:00
Bob Burger
4699fc1db0 improved consistency of Windows filename handling
original commit: 9017943cdba8c54c8f0acf20b037174780c10039
2018-10-22 16:17:12 -04:00
Matthew D. Miller
03ae461f54 Fixes typos pointed out in #353
original commit: ebee5db8fac9639bd88f313ef0c4a0641dba8317
2018-10-05 15:01:36 -05:00
Bob Burger
ad09be1a6a Updated some copyright years in csug
original commit: 6c738bdfde601b815c296f489697e61c314e4621
2018-06-21 13:44:05 -04:00
Andy Keep
29a9931e9b Small fix to with-output-to-string documentation (thanks @jtaylor-us)
and usage (thanks @ocyzl---issue #280).

original commit: 78b3946d3747a87f1ee3de811170c671c0c2b0c5
2018-05-25 21:46:01 -04:00
Oscar Waddell
3a5a3ab751 fix duplicate words
original commit: 38ade9595fe9771a02b00e22a50cede215a6b9ce
2018-05-22 16:09:14 -04:00
Bob Burger
db1ce365fc fixed two typos
original commit: 2d1d3ad5fcf4b63423d9e7ff783315792ac81626
2017-11-22 10:38:33 -05:00
Jason Hemann
934e202fde small change in documentation, ouch to shout OUCH
original commit: ad3fd16deebf8e6308d1e4726d6f5dc1fa8067e8
2017-10-11 15:53:43 -04:00
Bob Burger
831ea8ad18 changed copyright year to 2017
7.ss, scheme.1.in, comments of many files

original commit: 06f858f9a505b9d6fb6ca1ac97234927cb2dc641
2017-04-06 11:41:33 -04:00
Kent Dybvig
659a557a01 repaired descriptions of get-string-some! and get-bytevector-some!
original commit: e09139adddf9e25a5944215efb28677e60423970
2016-12-22 12:12:53 -05:00
Bob Burger
87f2f4106f fixed argument names in open-fd-output-port and open-fd-input/output-port
original commit: 66589024d5ff45200020015ac59f04242d45a362
2016-12-09 08:52:20 -05:00
Bob Burger
8679155d53 fixed typos in csug/io.stex
original commit: e38c5b2c5b01975c95f6b7cc05792e6074f86740
2016-08-23 12:41:46 -04:00
dybvig
c680147c5b - added descriptions of print-extended-identifiers to the user's guide
and release notes.  updated the release notes to account for a couple
  of other log entries.
    release_notes.stex,
    intro.stex, io.stex

original commit: 7d1bbdaaccc6640e1529fdbd8b40a8ff7012bee4
2016-08-22 23:34:32 -04:00
Bruce Mitchener
0f8d2e6998 Fix typos involving articles.
original commit: 1ada02cc4cadc6b9a7b2b2da4dd326fb0e7518f6
2016-04-28 11:01:10 +07:00
dyb
1356af91b3 initial upload of open-source release
original commit: 47a210c15c63ba9677852269447bd2f2598b51fe
2016-04-26 10:04:54 -04:00