-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db/leveldb: impl index read/write drop
encoding/gob
(#1370)
Two benefit below: * shrink go-cqhttp binary size about 200KiB * shrink database file from 2.8M to 1.56M compared with v2 database Also provide a tool to migrate v2 database: https://github.com/RomiChan/gocq-leveldb-migrate
- Loading branch information
1 parent
f2e26d0
commit 9054d4c
Showing
7 changed files
with
687 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package leveldb | ||
|
||
const dataVersion = 1 | ||
|
||
const ( | ||
group = 0x0 | ||
private = 0x1 | ||
guildChannel = 0x2 | ||
) | ||
|
||
type coder byte | ||
|
||
const ( | ||
coderNil coder = iota | ||
coderInt | ||
coderUint | ||
coderInt32 | ||
coderUint32 | ||
coderInt64 | ||
coderUint64 | ||
coderString | ||
coderMSG // global.MSG | ||
coderArrayMSG // []global.MSG | ||
coderStruct // struct{} | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.