Nigel Tao
a51867dc63
Fix "forseen" typo
2021-05-19 21:34:09 +10:00
Nigel Tao
2f78804e62
Use more inclusive language
2021-01-23 19:50:47 +11:00
Nigel Tao
d60815c93f
Have example/* global variable names start with g_
2020-03-26 14:32:35 +11:00
Nigel Tao
fdac24a425
Rename FOO_BUFFER_SIZE to FOO_BUFFER_ARRAY_SIZE
2020-03-06 21:53:08 +11:00
Nigel Tao
c30716208c
Remove accidental "#include <stdio.h>"
2020-03-06 09:19:49 +11:00
Nigel Tao
fe0cbbd6e9
Have example/jsonptr self-impose a sandbox
2020-03-06 09:07:59 +11:00
Nigel Tao
267a07d3cb
Add an example/zcat -fail-if-unsandboxed flag
2020-03-04 22:30:03 +11:00
Nigel Tao
2914bae3b2
Re-format C function signatures
2020-02-26 09:40:30 +11:00
Nigel Tao
9cc2c25f3d
Have different exit codes for errors vs exceptions
2020-02-23 17:05:49 +11:00
Nigel Tao
5f8d2da74f
Rename decode_io_writer methods to transform_io
2020-01-11 10:19:25 +11:00
Nigel Tao
e6db7f6a40
Make wuffs_base__status a struct
2020-01-05 10:48:20 +11:00
Nigel Tao
c50f16e58b
Separate status and status_msg local variables
2020-01-04 11:57:33 +11:00
Nigel Tao
355a95eeea
Add wuffs_base__status__message
2019-12-15 13:31:17 +11:00
Nigel Tao
aa846d2dd7
Remove io_{reader,writer} C types
2019-07-06 17:23:34 +10:00
Nigel Tao
7e384e079e
Take some unistd.h dependencies out of examples
2019-03-09 11:06:26 +11:00
Nigel Tao
c4b8a6a4cc
Don't use designated initializers
...
Some C/C++ compilers, such as MSVC, don't always support them. They're
also not supported by GCC's "g++ -std=c++11 -Wpedantic".
2019-03-09 10:08:00 +11:00
Nigel Tao
04ca24973a
Have example/zcat handle WORK_BUFFER_SIZE == 0
2019-02-16 14:46:42 +11:00
Nigel Tao
53760ce0fd
Call initialize instead of check_wuffs_version
2019-02-16 14:18:25 +11:00
Nigel Tao
fc4abafbe7
Rename decoder_max_incl_workbuf_len constants
2019-02-03 15:44:25 +11:00
Nigel Tao
de5b64a846
Rename max_incl_workbuf_len constants
2019-02-02 16:29:54 +11:00
Nigel Tao
5f7c807729
Generate macros for public scalar consts
2019-02-02 16:17:10 +11:00
Nigel Tao
c9830ceb9a
Add a workbuf argument to decode_io_writer
2019-02-02 15:35:05 +11:00
Nigel Tao
670b45be53
Add some "horizontal rule" comment lines
2019-02-02 08:10:08 +11:00
Nigel Tao
a27b24099e
Raise example/zcat's buffer size from 16K to 128K
...
This matches the 128K buffer size (ZSTD_DStreamOutSize returns
ZSTD_BLOCKSIZE_MAX, defined to be 1<<17 in
https://github.com/facebook/zstd/blob/dev/lib/zstd.h ) as shipped as
/usr/bin/zstdcat on Debian.
Decoding a 156 MiB gzipped file:
$ /usr/bin/time ./gen/bin/example-zcat < linux-4.20.4.tar.gz > /dev/null
Before:
2.14user 0.13system 0:02.28elapsed 100%CPU (0avgtext+0avgdata 1076maxresident)k
0inputs+0outputs (0major+75minor)pagefaults 0swaps
After:
2.03user 0.05system 0:02.09elapsed 99%CPU (0avgtext+0avgdata 1460maxresident)k
0inputs+0outputs (0major+135minor)pagefaults 0swaps
Before/After elapsed ratio: 2.28 / 2.09 = 1.09.
2019-01-26 09:32:55 +11:00
Nigel Tao
16e97281e2
Rename some decode methods to decode_io_writer
2019-01-12 10:29:41 +11:00
Nigel Tao
dd94ad3821
Rename z variable to status, in C code
2018-12-28 16:14:03 +11:00
Nigel Tao
04c91f1410
Generate .c files instead of .h files
...
The files' contents haven't changed (other than some relative #include's
that refer to other .c files).
Some build systems have difficulty recognizing .h files as things to be
compiled, instead of just things referred to by things to be compiled.
2018-12-22 15:29:00 +11:00
Nigel Tao
6fed251b40
Split an io_buffer's fields into data and meta
2018-09-15 08:45:50 +10:00
Nigel Tao
7798beaa8c
Add I/O positions
2018-08-26 16:31:19 +10:00
Nigel Tao
b840c80040
Make the status type a const char*, not a struct
2018-08-12 16:05:14 +10:00
Nigel Tao
2a32a86a6c
Make the status type a struct, not an int32_t
2018-08-11 13:27:29 +10:00
Nigel Tao
fd43e777bc
Have check_wuffs_version return a status code
2018-08-05 22:29:54 +10:00
Jimmy Casey
3c50ada2c6
Fixed Spelling.
2018-07-26 17:12:19 +00:00
Nigel Tao
bc82e51371
Rename wuffs-unsupported-snapshot.h
2018-07-21 09:20:10 +10:00
Nigel Tao
a0bafff465
Ship as a "single file C library"
2018-07-14 08:59:36 +10:00
Nigel Tao
6183aba9d7
Capitalize the $CC and $CXX environment variables
2018-06-30 10:43:26 +10:00
Nigel Tao
b09748c485
Build examples with -Wall -Werror
2018-06-30 09:10:10 +10:00
Nigel Tao
1bdfc4cda2
Add a wuffs_base__io_buffer__compact function
2018-06-23 07:50:21 +10:00
Nigel Tao
97e9b8aa8d
Have example/zcat use the release edition
2018-06-17 09:53:03 +10:00
Nigel Tao
50a955317a
Remove the WUFFS_FOO__STATUS_ETC names
2018-06-10 22:05:06 +10:00
Nigel Tao
d770e879ab
Remove the wuffs_foo__status types
2018-06-10 21:40:43 +10:00
Nigel Tao
43bb14e886
Redo the encoding of error codes
2018-06-10 21:22:41 +10:00
Nigel Tao
5b08ad2ba6
Change the order of check_wuffs_version args
...
This puts the self_ptr, self_len args next to each other.
2018-05-29 21:59:50 +10:00
Nigel Tao
87ab36f8c4
Have check_wuffs_version take the sizeof receiver
...
Also rename foo__initialize to foo__check_wuffs_version.
2018-05-29 14:20:27 +10:00
Nigel Tao
4926e98956
Have examples compile warning-free at -O3
2018-05-25 11:40:05 +10:00
Nigel Tao
8827e222b1
Add wuffs_base__io_buffer__{reader,writer} funcs
2018-04-27 20:54:44 +10:00
Nigel Tao
97aab37462
Rename buf1, reader1, etc to io_buffer, io_reader
...
Also remove the unused Buf1, Buf2 and Usize tokens.
2018-04-05 20:49:48 +10:00
Nigel Tao
707965488c
Add example/zcat
2018-03-28 13:51:01 +11:00