// writeToInnerHeader is an helper to write an inner header item to the given io.Writer
writeToInnerHeader is an helper to write an inner header item to the given io.Writer
// writeToInnerHeader is an helper to write an inner header item to the given io . Writer
func writeToInnerHeader(w io.Writer, id uint8, data []byte) error {
	if len(data) > 0 {
		if err := binary.Write(w, binary.LittleEndian, id); err != nil {
			return err
		}
		if err := binary.Write(w, binary.LittleEndian, uint32(len(data))); err != nil {
			return err
		}
		if err := binary.Write(w, binary.LittleEndian, data); err != nil {
			return err
		}
	}
	return nil
}
func writeToInnerHeader ( w io . Writer , id uint8 , data [ ] byte ) error { if len ( data ) > 0 { if err := binary . Write ( w , binary . LittleEndian , id ) ; err != nil { return err } if err := binary . Write ( w , binary . LittleEndian , uint32 ( len ( data ) ) ) ; err != nil { return err } if err := binary . Write ( w , binary . LittleEndian , data ) ; err != nil { return err } } return nil }
writeToInnerHeader is an helper to write an inner header item to the given io.Writer
writeToInnerHeader is an helper to write an inner header item to the given io . Writer