From 4003b6359747f6e43357e4bf190d4e71a66ec796 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 26 Dec 2024 04:15:28 +0700 Subject: 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. --- lib/binary/testdata/ApoFileWrite_test.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/binary/testdata/ApoFileWrite_test.txt (limited to 'lib/binary/testdata/ApoFileWrite_test.txt') 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 +// 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 -- cgit v1.3