1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
5 #ifndef STORAGE_LEVELDB_TABLE_BLOCK_H_
6 #define STORAGE_LEVELDB_TABLE_BLOCK_H_
10 #include "leveldb/iterator.h"
19 // Initialize the block with the specified contents.
20 explicit Block(const BlockContents& contents);
24 size_t size() const { return size_; }
25 Iterator* NewIterator(const Comparator* comparator);
28 uint32_t NumRestarts() const;
32 uint32_t restart_offset_; // Offset in data_ of restart array
33 bool owned_; // Block owns data_[]
37 void operator=(const Block&);
42 } // namespace leveldb
44 #endif // STORAGE_LEVELDB_TABLE_BLOCK_H_