There shouldn't be two encodings for unset. Many places have to know whether a type is a container to append the right unset value even though it had to know nothing else about the type.
The modified tag encoding could be
0 = nil
1 = zero-length primitive (e.g., "" or int 0)
N/2 even = primitive of length (N/4)
N/2 odd = container of length (N/4)-1
This will change the zng format and should be part of zng-beta.
@mccanne mentioned that this has already been done, and @nwt confirmed the references to tagNull in zcode/bytes.go as added as part of #1394 is evidence of this.
There shouldn't be two encodings for unset. Many places have to know whether a type is a container to append the right unset value even though it had to know nothing else about the type.
The modified tag encoding could be
This will change the zng format and should be part of zng-beta.