cberner / raptorq

Rust implementation of RaptorQ (RFC6330)
Apache License 2.0
264 stars 47 forks source link

ObjectTransmissionInformation question #138

Closed montekki closed 1 year ago

montekki commented 1 year ago

Hi I am configuring ObjectTransmissionInformation as follows:

let config = raptorq::ObjectTransmissionInformation::with_defaults(length as u64, 256);
let mut decoder = raptorq::Decoder::new(config);

And with that i am assuming that max_packet_size parameter stands for "the maximum size of the frame that can be encountered". Then, I am trying to decode a sequence that consists only of packets 128 bytes long and run into this assertion:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `256`,
 right: `128`', raptorq-1.7.0/src/octets.rs:695:5

Am I misunderstanding the purpose of max_packet_size parameter?

cberner commented 1 year ago

How did you generate the 128 byte frames? The encoder and decoder need to use the same object transmission information

montekki commented 1 year ago

I see, thanks!