5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2025-03-11 20:58:47 +03:00

decoder: add method to read payload references

This is in preparation for reading payloads from a dedicated payload
input stream.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2024-03-12 14:12:49 +01:00
parent d3447d0149
commit 2a7b789bbd

View File

@ -664,6 +664,11 @@ impl<I: SeqRead> DecoderImpl<I> {
async fn read_quota_project_id(&mut self) -> io::Result<format::QuotaProjectId> {
self.read_simple_entry("quota project id").await
}
async fn read_payload_ref(&mut self) -> io::Result<format::PayloadRef> {
self.current_header.check_header_size()?;
seq_read_entry(&mut self.input).await
}
}
/// Reader for file contents inside a pxar archive.