MCPcopy Create free account
hub / github.com/google/snappy / ByteArraySource

Class ByteArraySource

snappy-sinksource.h:146–156  ·  view source on GitHub ↗

A Source implementation that yields the contents of a flat array

Source from the content-addressed store, hash-verified

144
145// A Source implementation that yields the contents of a flat array
146class ByteArraySource : public Source {
147 public:
148 ByteArraySource(const char* p, size_t n) : ptr_(p), left_(n) { }
149 ~ByteArraySource() override;
150 size_t Available() const override;
151 const char* Peek(size_t* len) override;
152 void Skip(size_t n) override;
153 private:
154 const char* ptr_;
155 size_t left_;
156};
157
158// A Sink implementation that writes to a flat array without any bound checks.
159class UncheckedByteArraySink : public Sink {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected