From 34075fe42d59b60202c9330da8c0332601996d9e Mon Sep 17 00:00:00 2001 From: falsycat Date: Mon, 12 Feb 2024 13:06:11 +0900 Subject: [PATCH] add binary format description to README --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 7a605aa..bd3684d 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,29 @@ ALLCING is a structured logging library featuring on lightweightness. - compact log data with simple binary format - completely-free license (WTFPLv2) +# Log Data Format + +``` +# [TOKEN] means TOKEN is optional +# means TOKEN is constant and refer allcing.h for actual value + +ROOT := CHUNK_BEGIN | CHUNK_END | CHUNK_CHECK + +CHUNK_BEGIN := [CHUNK_DATA] +CHUNK_END := [CHUNK_DATA] +CHUNK_CHECK := [CHUNK_DATA] + +CHUNK_DATA := CHUNK_PAD | CHUNK_BLOB | CHUNK_CTX | CHUNK_LOC | CHUNK_DATA +CHUNK_PAD := PAD +CHUNK_BLOB := BLOB +CHUNK_CTX := UINT(64) UINT(16) +CHUNK_LOC := UINT(8) BLOB + +PAD := +BLOB := +UINT(x) := +``` + # License Do What The Fuck You Want to Public License v2