// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT

// Package util contains small helpers used across the repo
package util import ( ) // BigEndianUint24 returns the value of a big endian uint24 func ( []byte) uint32 { if len() < 3 { return 0 } := make([]byte, 4) copy([1:], ) return binary.BigEndian.Uint32() } // PutBigEndianUint24 encodes a uint24 and places into out func ( []byte, uint32) { := make([]byte, 4) binary.BigEndian.PutUint32(, ) copy(, [1:]) } // PutBigEndianUint48 encodes a uint64 and places into out func ( []byte, uint64) { := make([]byte, 8) binary.BigEndian.PutUint64(, ) copy(, [2:]) } // Max returns the larger value func (, int) int { if > { return } return }