code: func (d *Data) Unmarshal(b *buffer.Buffer) error {
  	data := make(Data, 0, b.Len())
  
  	// Iterate until not enough bytes remain to parse another length value
  	for b.Len() > 1 {
  		// 2 bytes: length of data.
  		length := int(b.Read16())
  
  		// N bytes: actual data.
  		data = append(data, b.Consume(length))
  	}
  
  	// At least one instance of class data must be present
  	if len(data) == 0 {
  		return io.ErrUnexpectedEOF
  	}
  
  	// If we encounter any trailing bytes, report an error
  	if b.Len() != 0 {
  		return io.ErrUnexpectedEOF
  	}
  
  	*d = data
  	return nil
  }
docs: // Unmarshal marshals from a given buffer into a Data structure.
  // Data is packed in the form:
  //   - 2 bytes: data length
  //   - N bytes: raw data