提交 16d007fa authored 作者: Thomas Mueller's avatar Thomas Mueller

MVStore: compress is now disabled by default, and can be enabled on request.

上级 58dec4b5
...@@ -729,7 +729,6 @@ public class Page { ...@@ -729,7 +729,6 @@ public class Page {
DataUtils.writeVarInt(buff, map.getId()); DataUtils.writeVarInt(buff, map.getId());
int len = keyCount; int len = keyCount;
DataUtils.writeVarInt(buff, len); DataUtils.writeVarInt(buff, len);
Compressor compressor = map.getStore().getCompressor();
int type = children != null ? DataUtils.PAGE_TYPE_NODE int type = children != null ? DataUtils.PAGE_TYPE_NODE
: DataUtils.PAGE_TYPE_LEAF; : DataUtils.PAGE_TYPE_LEAF;
buff.put((byte) type); buff.put((byte) type);
...@@ -749,7 +748,8 @@ public class Page { ...@@ -749,7 +748,8 @@ public class Page {
map.getValueType().write(buff, values[i]); map.getValueType().write(buff, values[i]);
} }
} }
if (compressor != null) { if (map.getStore().getCompress()) {
Compressor compressor = map.getStore().getCompressor();
int expLen = buff.position() - compressStart; int expLen = buff.position() - compressStart;
byte[] exp = new byte[expLen]; byte[] exp = new byte[expLen];
buff.position(compressStart); buff.position(compressStart);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论