func NewBundleHeader(b []byte) (*BundleHeader, error) {
	if len(b) != BundleHeaderSize {
		return nil, errors.New("invalid bundle header size")
	}
	r := bytes.NewReader(b)
	h := &BundleHeader{}
	if err := binary.Read(r, binary.LittleEndian, h); err != nil {
		return nil, err
	}
	return h, nil
}
// NewBundleHeader returns a new header from a given byte array.  The byte
// array's size is expected to be exactly BundleHeaderSize bytes.
NewBundleHeader returns a new header from a given byte array.  The byte
array's size is expected to be exactly BundleHeaderSize bytes.
// NewBundleHeader returns a new header from a given byte array . The byte // array ' s size is expected to be exactly BundleHeaderSize bytes .
func NewBundleHeader(b []byte) (*BundleHeader, error) {
	if len(b) != BundleHeaderSize {
		return nil, errors.New("invalid bundle header size")
	}
	r := bytes.NewReader(b)
	h := &BundleHeader{}
	if err := binary.Read(r, binary.LittleEndian, h); err != nil {
		return nil, err
	}
	return h, nil
}
func NewBundleHeader ( b [ ] byte ) ( * BundleHeader , error ) { if len ( b ) != BundleHeaderSize { return nil , errors . New ( " " ) } r := bytes . NewReader ( b ) h := & BundleHeader { } if err := binary . Read ( r , binary . LittleEndian , h ) ; err != nil { return nil , err } return h , nil }
NewBundleHeader returns a new header from a given byte array.
NewBundleHeader returns a new header from a given byte array .