pub fn new(stream: &'a mut impl ReadBytes) -> io::Result<BoxReader<'a>> {
        let header = BoxHeader::read(stream)?;
        let maxsize = std::cmp::min(stream.size(), stream.pos() + header.size);
        /*
        log::trace!(
            "BoxReader::new(): header {:?}, maxsize {}, left {}",
            header,
            maxsize,
            stream.left()
        );*/
        Ok(BoxReader {
            header,
            maxsize,
            pos: stream.pos(),
            inner: stream,
        })
    }
/// Read the box header, then return a size-limited reader.
Read the box header, then return a size-limited reader.
Read the box header then return a size - limited reader .
pub fn new(stream: &'a mut impl ReadBytes) -> io::Result<BoxReader<'a>> {
        let header = BoxHeader::read(stream)?;
        let maxsize = std::cmp::min(stream.size(), stream.pos() + header.size);
        /*
        log::trace!(
            "BoxReader::new(): header {:?}, maxsize {}, left {}",
            header,
            maxsize,
            stream.left()
        );*/
        Ok(BoxReader {
            header,
            maxsize,
            pos: stream.pos(),
            inner: stream,
        })
    }
pub fn new ( stream : & ' a mut impl ReadBytes ) -> io :: Result < BoxReader < ' a > > { let header = BoxHeader :: read ( stream ) ? ; let maxsize = std :: cmp :: min ( stream . size ( ) , stream . pos ( ) + header . size ) ; /*
        log::trace!(
            "BoxReader::new(): header {:?}, maxsize {}, left {}",
            header,
            maxsize,
            stream.left()
        );*/ Ok ( BoxReader { header , maxsize , pos : stream . pos ( ) , inner : stream , } ) }
Read the box header, then return a size-limited reader.
Read the box header then return a size - limited reader .
stream
&'a mut impl ReadBytes
stream
&'a mut impl ReadBytes