mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-06-30 07:01:16 +02:00
Simplified code of non interleaved spatial query in LevelDB backend.
This commit is contained in:
@ -80,9 +80,13 @@ func DecodeStringFromBytes(key []byte) (pos int64, err error) {
|
||||
return strconv.ParseInt(string(key), 10, 64)
|
||||
}
|
||||
|
||||
func StringToBytes(key int64) []byte {
|
||||
return []byte(strconv.FormatInt(key, 10))
|
||||
}
|
||||
|
||||
// Encode a block pos to byte slice.
|
||||
func EncodeStringToBytes(key int64) ([]byte, error) {
|
||||
return []byte(strconv.FormatInt(key, 10)), nil
|
||||
return StringToBytes(key), nil
|
||||
}
|
||||
|
||||
func ToBigEndian(key int64) []byte {
|
||||
|
Reference in New Issue
Block a user