37 [[nodiscard]]
virtual std::uint64_t
size()
const = 0;
40 virtual std::size_t
readAt(std::uint64_t offset, std::span<std::byte> output)
const = 0;
51 [[nodiscard]] std::uint64_t
size()
const override;
52 std::size_t
readAt(std::uint64_t offset, std::span<std::byte> output)
const override;
55 mutable std::ifstream m_file;
56 std::uint64_t m_size{};
67 [[nodiscard]] std::uint64_t
size()
const override;
68 std::size_t
readAt(std::uint64_t offset, std::span<std::byte> output)
const override;
71 std::span<const std::byte> m_data;
Random-access reader backed by caller-owned memory.
Definition random_access_reader.h:62
std::size_t readAt(std::uint64_t offset, std::span< std::byte > output) const override
Reads up to output.size() bytes from offset and returns the number of bytes read.
BufferRandomAccessReader(std::span< const std::byte > data)
Uses caller-owned memory as a random-access byte source.
std::uint64_t size() const override
Returns the total readable byte count.
Random-access reader backed by a filesystem file.
Definition random_access_reader.h:46
std::uint64_t size() const override
Returns the total readable byte count.
std::size_t readAt(std::uint64_t offset, std::span< std::byte > output) const override
Reads up to output.size() bytes from offset and returns the number of bytes read.
FileRandomAccessReader(const std::filesystem::path &path)
Opens path for random-access reads.
Random-access byte reader used for container formats such as MUSX.
Definition random_access_reader.h:32
virtual std::size_t readAt(std::uint64_t offset, std::span< std::byte > output) const =0
Reads up to output.size() bytes from offset and returns the number of bytes read.
virtual std::uint64_t size() const =0
Returns the total readable byte count.
Core public API for the Denigma conversion libraries.
Definition articulations.h:32