func (h *Header) bytes(length uint32) ([]byte, error) {
    p := make([]byte, 1, 5)
    p[0] = byte(*h)
    if ret, err := len4(length).bytes(); err != nil {
        return nil, err
    } else {
        p = append(p, ret...)
    }
    return p, nil
}
// Encode header, along with the length
Encode header, along with the length
// Encode header along with the length
func (h *Header) bytes(length uint32) ([]byte, error) {
    p := make([]byte, 1, 5)
    p[0] = byte(*h)
    if ret, err := len4(length).bytes(); err != nil {
        return nil, err
    } else {
        p = append(p, ret...)
    }
    return p, nil
}
func ( h * Header ) bytes ( length uint32 ) ( [ ] byte , error ) { p := make ( [ ] byte , 1 , 5 ) p [ 0 ] = byte ( * h ) if ret , err := len4 ( length ) . bytes ( ) ; err != nil { return nil , err } else { p = append ( p , ret ... ) } return p , nil }
Encode header, along with the length
Encode header along with the length