219 Commits
Author SHA1 Message Date
Nigel Tao b2e6da3024 lib/suitar: allow implicitly-sized entries 2026-09-29 22:31:20 +10:00
Nigel Tao b1adeeccb1 lib/suitar: allow Write to a sparse entry 2026-09-15 15:31:04 +10:00
Nigel Tao b77e1a67de lib/suitar: make some Reader.Next errors sticky
Updates PR #179
2026-09-15 14:02:10 +10:00
Nigel Tao c944c491c4 lib/suitar: tweak some style nits
Updates PR #179
2026-09-15 14:00:21 +10:00
Nigel Tao 1ca418ef16 snippet/uncompng: support APNG (Animated PNG) 2026-09-15 10:42:51 +10:00
Nigel Tao 742e8b78d9 lib/suitar: reject names ending in "/." or "/.." 2026-09-15 10:42:51 +10:00
rootkiller6788 193d0354b4 lib/suitar: test chunked writes and directory entries
TestWriterChunked writes one file several times, splitting the contents
over Write calls differently each time, and checks the archive bytes come
out identical. The capped writer makes a runaway Write fail the test
instead of hanging it.

TestWriterDir writes a directory and then a file inside it, and reads
both back.
2026-09-12 23:48:25 +08:00
rootkiller6788 26ce8600a1 lib/suitar: let WriteHeader write a directory entry
WriteHeader copied h into w.header before calling w.Write to emit the
GNUTYPE_LONGNAME block holding the name. Write only accepts TypeReg and
TypeGNUSparse, so a TypeDir header failed that call and left the Writer
permanently in an error state - every later entry on the same Writer
failed too.

Set w.header after the name block has gone out instead.
2026-09-12 23:48:18 +08:00
rootkiller6788 05a8209fa7 lib/suitar: reset bIndex after flushing a full block
Write left w.bIndex at 512 once a full block had been written out, so the
next loop iteration took the "partial block" branch, copied zero bytes and
went round again forever, writing the same 512 bytes over and over. Calling
Write with sizes that aren't multiples of 512 is enough to hit this.

It also duplicated the last data block when a Write call happened to end
exactly on a block boundary, because flush then saw a non-zero bIndex and
wrote the block out a second time.
2026-09-12 23:48:01 +08:00
Nigel Tao 0f214ba59c lib/suitar: add trailing EOF blocks
Both /usr/bin/tar and the Go standard library don't seem to need this,
but some other TAR readers might expect it.
2026-09-03 08:31:06 +10:00
Nigel Tao 504f8485f4 lib/suitar: add new Go package
$ TZ=UTC tar -tvf test/data/archive.dense.suitar
-rw-r--r-- nobody/nobody     0 2020-02-05 06:10 artificial/0.bytes
-rw-r--r-- nobody/nobody   853 2020-08-12 14:04 github-tags.json
-rwxr-xr-x nobody/nobody   693 2021-05-03 06:19 hello.sh
-rw-r--r-- nobody/nobody   104 2021-05-03 06:16 non-ascii/αβ.txt
-rw-r--r-- nobody/nobody   151 2021-05-03 06:23 non-ascii/😻.txt
-rw-r--r-- nobody/nobody   208 2020-02-05 06:10 pjw-thumbnail.png
-rw-r--r-- nobody/nobody   942 2020-02-05 06:10 romeo.txt
-rw-r--r-- nobody/nobody   558 2020-02-05 06:10 romeo.txt.gz
2026-09-01 21:55:46 +10:00
Nigel Tao ce863060d6 lib/uncompng: support APNG (Animated PNG) 2026-08-25 10:17:48 +10:00
Nigel Tao e772ccd47a lib/uncompng: rearrange Encode argument order 2026-08-11 09:52:32 +10:00
Nigel Tao 46ac36bd7b std/handsum: tweak scaleAndBiasChromaDown 2026-07-08 10:23:10 +10:00
Nigel Tao ad039b5d3a snippet: add basic-handsum-decode.c 2026-06-29 14:28:48 +10:00
Nigel Tao 9c6d1dacad cmd/handsum: append '\n' to base64 output 2026-06-25 22:22:26 +10:00
Nigel Tao 30c0736336 lib/handsum: add aspect ratio comment 2026-06-22 17:03:56 +10:00
Nigel Tao 40f39a3ba3 cgen: omit "x ~mod+= y ~mod* 0" 2026-06-19 20:28:56 +10:00
Nigel Tao 11dfe340a1 lib/lowleveljpeg: add YCoCg methods 2026-05-08 09:18:04 +10:00
Nigel Tao c400a47bb9 lib/lowleveljpeg: s/ExtractFrom/ExtractYCbCrFrom/ 2026-05-06 22:19:52 +10:00
Nigel Tao 979a9d898c lib/handsum: renumber quality from 0..=3 to 1..=4 2026-05-06 21:39:21 +10:00
Nigel Tao 2822b1a65d std/handsum: make 1:1 aspect ratio be landscape 2026-05-05 10:34:48 +10:00
Nigel Tao 15645dbb10 std/handsum: apply cube root mapping to alpha 2026-05-04 12:58:34 +10:00
Nigel Tao 3ad22468ce std/handsum: fix frame config background color 2026-05-04 12:53:33 +10:00
Nigel Tao 40cf8c0ad1 lib/parsecolor: add "none" and "transparent" 2026-05-02 11:11:06 +10:00
Nigel Tao 30ac5c2e89 std/handsum: add alpha channel support 2026-05-01 23:24:29 +10:00
Nigel Tao 38a5e853c9 std/handsum: tweak magic identifier bytes 2026-05-01 23:23:21 +10:00
Nigel Tao a3ae753865 lib/parsecolor: add magenta 2026-05-01 09:07:11 +10:00
Nigel Tao f731cfc72f cmd/handsum: add -b background color flag 2026-04-30 21:45:26 +10:00
Nigel Tao 559daaeac8 lib/handsum: have decode resize match std/handsum 2026-04-28 23:00:15 +10:00
Nigel Tao f8c6b35ff5 std/handsum: redo Handsum image file format 2026-04-28 21:12:28 +10:00
Nigel Tao 32b741db7f lib/lowleveljpeg: round cosines table to nearest 2026-04-19 12:04:16 +10:00
Nigel Tao f4f46bd395 lib/lowleveldct2x2: simplify DCT formulae 2026-04-19 11:38:38 +10:00
Nigel Tao 9fae50da1f lib/lowleveldct4x4: add new Go package 2026-04-19 10:45:33 +10:00
Nigel Tao cbdc4d5f64 lib/handsum: add Potato, Gray variants 2026-04-12 15:56:00 +10:00
Nigel Tao a6c89da981 std/handsum: change version bits from 0x00 to 0x40 2026-04-08 21:08:43 +10:00
Nigel Tao 67e9078eab example/convert-to-nia: allow 16-bit PNG output 2025-06-23 09:51:31 +10:00
Nigel Tao 263bbfabf0 lib/handsum: add EncodeOptions type 2025-03-02 14:10:11 +11:00
Nigel Tao 64daf2653e lib/lowleveljpeg: add MinimumBaselineQuality 2025-02-27 22:08:14 +11:00
Nigel Tao f483ef0849 lib/lowleveljpeg: add Abs method, nil checks 2025-02-23 12:24:43 +11:00
Nigel Tao 12b404f58d cmd/handsum: new tool for the Handsum file format 2025-02-23 12:15:59 +11:00
Nigel Tao 9a7e2a4d06 lib/lowleveljpeg: add {Down,Up}sampleFrom 2025-02-14 18:25:17 +11:00
Nigel Tao 689f84213f lib: fix "go test" example names 2025-02-11 15:45:38 +11:00
Nigel Tao 2cac96f56b lib/lowleveljpeg: add new Go package 2025-02-11 14:46:34 +11:00
Nigel Tao d9c1a386db lib/uncompng: add new Go package 2024-09-19 14:51:21 +09:30
Nigel Tao bd42fa7af2 base38: reassign alphabet and numbers
It changes from " 0-9?a-z" to ".0-9a-z~". The default or placeholder
changes from " " to "." so it's now always visible. The wildcard changes
from "?" to "~" so it's now sorted last.
2024-08-26 12:30:20 +10:00
Nigel Tao 42d3b4d692 litonlylzma: add allowTestsToExecOtherPrograms 2023-11-25 11:16:52 +11:00
Nigel Tao b9c737eb37 litonlylzma: add TestUsrBinFoocatCompat 2023-10-17 21:25:38 +11:00
Patrick Georgi f563f32f82 Add SPDX identifier to license headers
SPDX is an ISO standard for describing licenses in a computer readable
format, which is useful when applying license compliance tools and the
like to source code.

In addition to ensuring that the Wuffs C distribution is properly
annotated to the benefit of projects using Wuffs and SPDX-supporting
tools, add it everywhere else where there's a license in this repo for
consistency, too.
2023-10-06 20:52:36 +02:00
Nigel Tao 74a6ea2fcd all: relicense from Apache2 to dual Apache2/MIT
The LICENSE has changed from a single license (Apache2) to a dual
license (Apache2 or MIT, at your option).

If you've previously used Wuffs under the Apache2 license, you are able
to keep doing so. No further action required by you.

The two files listed below (previous releases) are exceptions, as they
are older snapshots, frozen in time. Their license has not changed:
release/c/wuffs-v0.2.c
release/c/wuffs-v0.3.c

Every name in the AUTHORS file, other than Google Inc., has signed
Google's CLA (Contributor License Agreement).
2023-10-06 10:00:59 +11:00