public void AddLengthEncoded(ISerializedType value) { var bytes = new BytesList(); value.ToBytesSink(bytes); AddLengthEncoded(bytes); }
public void Add(Field field, ISerializedType value) { AddFieldHeader(field); if (field.IsVlEncoded()) { AddLengthEncoded(value); } else { value.ToBytesSink(_sink); if (field.Type == Fields.Type.StObject) { AddFieldHeader(Field.ObjectEndMarker); } else if (field.Type == Fields.Type.StArray) { AddFieldHeader(Field.ArrayEndMarker); } } }
public void Write(ISerializedType obj) { obj.ToBytesSink(_list); }