The current stack of specs is as follows:
(above: off-heap data structures) CodecSpec BufferSpec BlockBufferSpec (below: bytes on disk)
As we introduce encoded types, it makes sense (thanks Patrick!) to think of this entire stack as the encoded type – an encoded type is the way we interpret bytes on disk.
There is a problem with the current design - the CodecSpec doesn’t have the information it needs to decode the bytes on disk. Instead, it takes the virtual/physical type of the encoded data as an argument.
The right solution is to put the EType in the CodecSpec. This will require a bit of an infrastructural lift, unfortunately.