How to implement 2GB per chunk?

Hello, I have a problem when using openssl: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: TryFromIntError(())' · Issue #1765 · sfackler/rust-openssl · GitHub

The author told me that I'll need to split the Vec<u8> up into multiple chunks. But I have no idea how to implement 2GB per chunk.

Could you give me some algorithm hints or sample code?

There's a chunks() method:

for chunk in vec.chunks(1<<31) {
}
2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.