omar-azmi / byte_codec_ts

a schema based serializer for primitive javascript types with no external dependencies.
https://omar-azmi.github.io/byte_codec_ts/
The Unlicense
0 stars 0 forks source link

minor improvements to do #3

Open omar-azmi opened 2 years ago

omar-azmi commented 2 years ago

utility.ts

schema_codec.ts

tasks above were completed at commit d7f7bb641d1831ffe9fb962ea53c67c2f03b2df4

omar-azmi commented 2 years ago

primitive_codec.ts

class CanvasRectHeader extends SRecord { constructor() { super( new SPrimitive("u4l").setName("x"), new SPrimitive("u4l").setName("y"), new SPrimitive("u4l").setName("width"), new SPrimitive("u4l").setName("height"), new SHeadPrimitive("u1", "i4l[]", [0,] as [0, ...number[]]).setName("palette"), ) } }