pub fn encoded_read(
fd: BorrowedFd<'_>,
buf: &mut [u8],
offset: u64,
len: u64,
) -> Result<EncodedReadResult>Expand description
Read compressed (encoded) data from a file using BTRFS_IOC_ENCODED_READ.
This reads the raw compressed extent data without decompressing it,
which is the counterpart to encoded_write. The caller provides a
buffer to receive the data; the returned EncodedReadResult describes
the encoding and how many bytes were read.
Errors: ENOTTY on kernels that do not support encoded reads (pre-5.18). EINVAL if the offset or length are not accepted.