ssbc / ssb-bfe

Binary Field Encodings (BFE) for Secure Scuttlebutt (SSB)
3 stars 1 forks source link

simplify implementation, remove encodeClassic etc #7

Closed staltz closed 3 years ago

staltz commented 3 years ago

Lots going on here:

staltz commented 3 years ago

Yes I know what you mean, and was unsure what to do, because in practice there is no "D" bytes. But for clarity it might be better that we are returning the "whole" TFD, despite the D being useless.

PS: I renamed "NULL" to "NIL" to reflect that this is a primitive that has nothing to do with JS null, it's a cross-language concept, so I picked the name that Go uses.

arj03 commented 3 years ago

Yeah that is what I'm thinking.

I like the nil to signify that this is not a JS encoding :)

arj03 commented 3 years ago

Excellent! Nice addition with the latest NIL_TFD change.