Function ogg_pager::paginate

source ·
pub fn paginate<'a, I>(
    packets: I,
    stream_serial: u32,
    abgp: u64,
    flags: u8
) -> Result<Vec<Page>>
where I: IntoIterator<Item = &'a [u8]> + 'a,
Expand description

Create pages from a list of packets

§Errors

  • Unable to read packet content

§Example

use ogg_pager::paginate;

// Creating the comment header
let comment_header_packet = vec![...];
let stream_serial_number = 2784419176;

let pages = paginate(&comment_header_packet, stream_serial_number, 0, 0);