taoensso / nippy

The fastest serialization library for Clojure

Home Page:https://www.taoensso.com/nippy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Offer public API for Nippy type info

ptaoussanis opened this issue · comments

Relevant for: #147, #140 (esp. comment).

Nippy's data format consists of 2x main parts:

  1. Nippy's internal schema: mostly just the set of [byte-id type length] tuples.
  2. The encoding of base types as per java.io.DataOutput and optional compression/encryption.

(1) is currently defined by a private var (nippy/type-ids).

The discussion on #140 concluded that it'd be useful for (1) to be made somehow public.

Just making the current nippy/type-ids private var public would not be ideal- we can probably offer a more convenient API to the same info.

Comments/PRs welcome for ideas, otherwise I'll try take a look at this next time I'm doing some batched work on Nippy.

@refset Hi Jeremy, just checking if this issue is still relevant for you?
I'm prioritising open-source work atm, and this is a candidate for one of my next tasks.

Thanks

@refset I had an opportunity today, so just went ahead with this.
Have pushed [com.taoensso/nippy "3.3.0-alpha2"] to Clojars with the following experimental new var.

From my understanding of your objective, this should hopefully allow you to write a much simpler version of your get-len utility.

Feedback welcome.

Cheers

Hey @ptaoussanis - thanks a lot for this, it looks great :) we'll try to find some time to kick the tyres properly soon!