func Keys(file string, from []byte, limit, offset uint32, asc bool) ([][]byte, error) {
	if from == nil {
		return pudge.Keys(file, nil, int(limit), int(offset), asc)
	}
	return pudge.Keys(file, from, int(limit), int(offset), asc)
}
Keys return keys in ascending  or descending order (false - descending,true - ascending)
if limit == 0 return all keys
if offset>0 - skip offset records
If from not nil - return keys after from (from not included)
If last byte of from == "*" - return keys with this prefix
package slowpoke
import (
	"bytes"
	"encoding/binary"
	"encoding/gob"
	"reflect"
	"github.com/recoilme/pudge"
)
func Set(file string, key []byte, val []byte) (err error) {
	return pudge.Set(file, key, val)
}
func Put(file string, key []byte, val []byte) (err error) {
	return pudge.Set(file, key, val)
}
func SetGob(file string, key interface{}, val interface{}) (err error) {
	bufKey := bytes.Buffer{}
	if reflect.TypeOf(key).String() == "[]uint8" {
		v := key.([]byte)
		_, err = bufKey.Write(v)
	} else {
		err = gob.NewEncoder(&bufKey).Encode(key)
	}
	return pudge.Set(file, bufKey.Bytes(), val)
}
func Has(file string, key []byte) (exist bool, err error) {
	return pudge.Has(file, key)
}
func Count(file string) (uint64, error) {
	cnt, err := pudge.Count(file)
	return uint64(cnt), err
}
func Counter(file string, key []byte) (counter uint64, err error) {
	val, err := Get(file, key)
	if val == nil || len(val) != 8 {
		err = nil
		counter = 0
	} else {
		counter = binary.BigEndian.Uint64(val)
	}
	counter++
	b := make([]byte, 8)
	binary.BigEndian.PutUint64(b, counter)
	err = Set(file, key, b)
	return counter, err
}
func Open(file string) (db *pudge.Db, err error) {
	return pudge.Open(file, nil)
}
func Get(file string, key []byte) (val []byte, err error) {
	err = pudge.Get(file, key, &val)
	return val, err
}
func GetGob(file string, key interface{}, val interface{}) (err error) {
	bufKey := bytes.Buffer{}
	if reflect.TypeOf(key).String() == "[]uint8" {
		v := key.([]byte)
		_, err = bufKey.Write(v)
	} else {
		err = gob.NewEncoder(&bufKey).Encode(key)
	}
	return pudge.Get(file, bufKey.Bytes(), val)
}