29 #ifndef THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_ 30 #define THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_ 43 virtual void Append(
const char* bytes,
size_t n) = 0;
60 virtual char* GetAppendBuffer(
size_t length,
char* scratch);
73 virtual void AppendAndTakeOwnership(
74 char* bytes,
size_t n,
void (*deleter)(
void*,
const char*,
size_t),
100 virtual char* GetAppendBufferVariable(
101 size_t min_size,
size_t desired_size_hint,
char* scratch,
102 size_t scratch_size,
size_t* allocated_size);
107 void operator=(
const Sink&);
117 virtual size_t Available()
const = 0;
132 virtual const char* Peek(
size_t* len) = 0;
137 virtual void Skip(
size_t n) = 0;
142 void operator=(
const Source&);
150 virtual size_t Available()
const;
151 virtual const char* Peek(
size_t* len);
152 virtual void Skip(
size_t n);
163 virtual void Append(
const char* data,
size_t n);
164 virtual char* GetAppendBuffer(
size_t len,
char* scratch);
165 virtual char* GetAppendBufferVariable(
166 size_t min_size,
size_t desired_size_hint,
char* scratch,
167 size_t scratch_size,
size_t* allocated_size);
168 virtual void AppendAndTakeOwnership(
169 char* bytes,
size_t n,
void (*deleter)(
void*,
const char*,
size_t),
175 char* CurrentDestination()
const {
return dest_; }
182 #endif // THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_