MCPcopy Create free account
hub / github.com/archlinux/alpm / read

Method read

alpm-compress/src/decompression/decoder.rs:77–85  ·  view source on GitHub ↗
(&mut self, buf: &mut [u8])

Source from the content-addressed store, hash-verified

75
76impl Read for CompressionDecoder<'_> {
77 fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
78 match self {
79 CompressionDecoder::Bzip2(decoder) => decoder.read(buf),
80 CompressionDecoder::Gzip(decoder) => decoder.read(buf),
81 CompressionDecoder::Xz(decoder) => decoder.read(buf),
82 CompressionDecoder::Zstd(decoder) => decoder.read(buf),
83 CompressionDecoder::None(reader) => reader.read(buf),
84 }
85 }
86
87 fn read_to_end(&mut self, buf: &mut Vec<u8>) -> std::io::Result<usize> {
88 match self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected