Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 13 of 13) sorted by relevance

/leveldb-1.20/helpers/memenv/
H A Dmemenv.cc53 if (offset > size_) { in Read()
56 const uint64_t available = size_ - offset; in Read()
65 assert(offset / kBlockSize <= SIZE_MAX); in Read()
66 size_t block = static_cast<size_t>(offset / kBlockSize); in Read()
67 size_t block_offset = offset % kBlockSize; in Read()
101 size_t offset = size_ % kBlockSize; in Append() local
103 if (offset != 0) { in Append()
105 avail = kBlockSize - offset; in Append()
115 memcpy(blocks_.back() + offset, src, avail); in Append()
194 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument
[all …]
/leveldb-1.20/doc/
H A Dtable_format.md20 offset: varint64
65 in a block whose file offset falls within the range
83 [offset of filter 0] : 4 bytes
84 [offset of filter 1] : 4 bytes
85 [offset of filter 2] : 4 bytes
87 [offset of filter N-1] : 4 bytes
89 [offset of beginning of offset array] : 4 bytes
92 The offset array at the end of the filter block allows efficient
93 mapping from a data block offset to the corresponding filter.
/leveldb-1.20/db/
H A Dcorruption_test.cc126 void Corrupt(FileType filetype, int offset, int bytes_to_corrupt) { in Corrupt() argument
150 if (offset < 0) { in Corrupt()
152 if (-offset > sbuf.st_size) { in Corrupt()
153 offset = 0; in Corrupt()
155 offset = sbuf.st_size + offset; in Corrupt()
158 if (offset > sbuf.st_size) { in Corrupt()
159 offset = sbuf.st_size; in Corrupt()
161 if (offset + bytes_to_corrupt > sbuf.st_size) { in Corrupt()
162 bytes_to_corrupt = sbuf.st_size - offset; in Corrupt()
170 contents[i + offset] ^= 0x80; in Corrupt()
H A Dlog_test.cc155 void IncrementByte(int offset, int delta) { in IncrementByte() argument
156 dest_.contents_[offset] += delta; in IncrementByte()
159 void SetByte(int offset, char new_byte) { in SetByte() argument
160 dest_.contents_[offset] = new_byte; in SetByte()
517 for (int offset = kBlockSize; offset < 2*kBlockSize; offset++) { in TEST() local
518 SetByte(offset, 'x'); in TEST()
H A Ddb_test.cc174 virtual Status Read(uint64_t offset, size_t n, Slice* result, in NewRandomAccessFile() argument
177 return target_->Read(offset, n, result, scratch); in NewRandomAccessFile()
/leveldb-1.20/table/
H A Dformat.h27 uint64_t offset() const { return offset_; } in offset() function
28 void set_offset(uint64_t offset) { offset_ = offset; } in set_offset() argument
H A Dtable_builder.cc24 uint64_t offset; member
51 offset(0), in Rep()
135 r->filter_block->StartBlock(r->offset); in Flush()
179 handle->set_offset(r->offset); in WriteRawBlock()
190 r->offset += block_contents.size() + kBlockTrailerSize; in WriteRawBlock()
250 r->offset += footer_encoding.size(); in Finish()
267 return rep_->offset; in FileSize()
H A Dtable.cc183 EncodeFixed64(cache_key_buffer+8, handle.offset()); in BlockReader()
238 !filter->KeyMayMatch(handle.offset(), k)) { in InternalGet()
268 result = handle.offset(); in ApproximateOffsetOf()
273 result = rep_->metaindex_handle.offset(); in ApproximateOffsetOf()
279 result = rep_->metaindex_handle.offset(); in ApproximateOffsetOf()
H A Dblock.cc110 uint32_t offset = GetRestartPoint(index); in SeekToRestartPoint() local
111 value_ = Slice(data_ + offset, 0); in SeekToRestartPoint()
H A Dtable_test.cc120 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument
122 if (offset > contents_.size()) { in Read()
125 if (offset + n > contents_.size()) { in Read()
126 n = contents_.size() - offset; in Read()
128 memcpy(scratch, &contents_[offset], n); in Read()
H A Dformat.cc78 Status s = file->Read(handle.offset(), n + kBlockTrailerSize, &contents, buf); in ReadBlock()
/leveldb-1.20/util/
H A Denv_posix.cc151 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument
162 ssize_t r = pread(fd, scratch, n, static_cast<off_t>(offset)); in Read()
197 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument
200 if (offset + n > length_) { in Read()
204 *result = Slice(reinterpret_cast<char*>(mmapped_region_) + offset, n); in Read()
/leveldb-1.20/include/leveldb/
H A Denv.h215 virtual Status Read(uint64_t offset, size_t n, Slice* result,