diff options
| author | Shulhan <ms@kilabit.info> | 2024-12-26 04:15:28 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-12-28 16:46:59 +0700 |
| commit | 4003b6359747f6e43357e4bf190d4e71a66ec796 (patch) | |
| tree | f219d067b0a5a3a2bfe8554f88f39f580a5c59d6 /lib/binary/testdata/ApoFileWrite_test.txt | |
| parent | 052d4673d0d7777bd429134f9f30c4a87462208f (diff) | |
| download | pakakeh.go-4003b6359747f6e43357e4bf190d4e71a66ec796.tar.xz | |
lib/binary: implement append-only binary file
The binary is new package that complement the standard binary package
Currently it implement append-only binary that encode the data using
[binary.Writer].
We call them "Apo" for short.
Diffstat (limited to 'lib/binary/testdata/ApoFileWrite_test.txt')
| -rw-r--r-- | lib/binary/testdata/ApoFileWrite_test.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/binary/testdata/ApoFileWrite_test.txt b/lib/binary/testdata/ApoFileWrite_test.txt new file mode 100644 index 00000000..97d9f293 --- /dev/null +++ b/lib/binary/testdata/ApoFileWrite_test.txt @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: 2024 M. Shulhan <ms@kilabit.info> +// SPDX-License-Identifier: BSD-3-Clause + +Test writing data to ApoWriter. + +The hex "18 14 98 b5 17 c8 78 00" is time stamp for 2024-12-26T02:21:00Z. + +<<< insert +insert + | 0 1 2 3 4 5 6 7 | 01234567 | 0 1 2 3 4 5 6 7 | + | 8 9 A B C D E F | 89ABCDEF | 8 9 A B C D E F | +0x00000000| 01 00 00 00 00 00 00 00 | ........ | 1 0 0 0 0 0 0 0 |0 +0x00000008| 01 00 00 00 00 00 00 00 | ........ | 1 0 0 0 0 0 0 0 |8 +0x00000010| 26 18 14 98 b5 17 c8 78 | &......x | 38 24 20 152 181 23 200 120 |16 +0x00000018| 00 00 00 00 00 00 00 00 | ........ | 0 0 0 0 0 0 0 0 |24 +0x00000020| 00 00 00 00 00 01 00 00 | ........ | 0 0 0 0 0 1 0 0 |32 +0x00000028| 00 00 00 00 00 01 00 00 | ........ | 0 0 0 0 0 1 0 0 |40 +0x00000030| 00 00 00 00 00 11 | ...... | 0 0 0 0 0 17 |48 |
