Done returns the final output of the encoder. This UidPack MUST BE FREED via a call to FreePack.
()
| 128 | |
| 129 | // Done returns the final output of the encoder. This UidPack MUST BE FREED via a call to FreePack. |
| 130 | func (e *Encoder) Done() *pb.UidPack { |
| 131 | e.packBlock() |
| 132 | if e.pack != nil && e.Alloc != nil { |
| 133 | e.pack.AllocRef = e.Alloc.Ref |
| 134 | } |
| 135 | return e.pack |
| 136 | } |
| 137 | |
| 138 | // Decoder is used to read a pb.UidPack object back into a list of UIDs. |
| 139 | type Decoder struct { |