Now, it's possible (and recommended) to use @packed() to produce
smaller encoded data. Additionally, table will use @packed() by
default, and that is backward-compatible.
That change also removes the size-each value from slice-headers,
which saves 4-bytes per each dynamic array.
This tag can be use in the project header, enabling it on all
inline struct declared in the file:
karmem name @packed();
This tag can be used to enable/disable @packed() for each
inline:
struct Foo inline @packed(true) { ... }
If the document is using @packed(true), it's possible to opt-out,
using @packed(false) for specific struct:
struct Foo inline @packed(false) { ... }
There's no reason to use @packed(false), except from compatibility
reasons, for projects releases before this patch.
Now, it's possible (and recommended) to use
@packed()
to produce smaller encoded data. Additionally,table
will use@packed()
by default, and that is backward-compatible.That change also removes the
size-each
value from slice-headers, which saves 4-bytes per each dynamic array.This tag can be use in the project header, enabling it on all
inline
struct declared in the file:This tag can be used to enable/disable
@packed()
for eachinline
:If the document is using
@packed(true)
, it's possible to opt-out, using@packed(false)
for specific struct:There's no reason to use
@packed(false)
, except from compatibility reasons, for projects releases before this patch.Closes #71 Closes #65 Fixes #32
Signed-off-by: Inkeliz inkeliz@inkeliz.com