alamb commented on issue #6709:
URL: https://github.com/apache/arrow-rs/issues/6709#issuecomment-2591281696

   I verified that this does indeed compile:
   
   ```rust
       let file = std::fs::File::open("/tmp/foo.txt").unwrap();
       let mmap = unsafe { Mmap::map(&file).unwrap() };
       let bytes = Bytes::from_owner(mmap);
       let buffer = Buffer::from_bytes(bytes.into());
   ```
   
   (and then you can use the 
[example](https://docs.rs/arrow-ipc/latest/arrow_ipc/reader/struct.FileDecoder.html)
 @tustvold  mentions on `FileDecoder`)
   
   For anyone following along this means the underlying arrow arrays will then 
(re)use the mmap region
   
   I agree an example would make this much easier to understand.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to