hypercore-protocol / hypercore-next

Hypercore 10 is an append only log with multi-writer primitives built in.
MIT License
150 stars 15 forks source link

Add encodeBatch constructor option #66

Closed andrewosh closed 2 years ago

andrewosh commented 2 years ago

valueEncoding is applied to individual blocks during batch appends (core.append([b1, b2, b3])). The encodeBatch option is a function that's passed complete batches, and must return a binary-encoded batch.