The SegmentWriter is able to store blob IDs that are no longer than 4096 bytes, but some implementation of BlobStore may return blob IDs 4096 bytes long (or more).
It should be possible to use a different encoding for long blob IDs. The blob IDs should be written as a string (using SegmentWriter#writeString), and its reference ID embedded into a value record.
The encoding in this case should be something like the following:
where the three least significant bits of the first bytes are actually unused, and the three bytes are used to store the record ID of the string representing the blob ID.
This new encoding is necessary to maintain backwards compatibility with the current way of storing blob IDs and to give a way to SegmentBlob to recognise this new encoding.