numeric_util

package
v0.0.0-...-27f001b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright (c) 2014 Couchbase, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2014 Couchbase, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const SHIFT_START_INT64 byte = 0x20

Variables

This section is empty.

Functions

func Float64ToInt64

func Float64ToInt64(f float64) int64

func Int64ToFloat64

func Int64ToFloat64(i int64) float64

Types

type PrefixCoded

type PrefixCoded []byte

PrefixCoded is a byte array encoding of 64-bit numeric values shifted by 0-63 bits

func MustNewPrefixCodedInt64

func MustNewPrefixCodedInt64(in int64, shift uint) PrefixCoded

func NewPrefixCodedInt64

func NewPrefixCodedInt64(in int64, shift uint) (PrefixCoded, error)

func (PrefixCoded) Int64

func (p PrefixCoded) Int64() (int64, error)

func (PrefixCoded) Shift

func (p PrefixCoded) Shift() (uint, error)

Shift returns the number of bits shifted returns 0 if in uninitialized state

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL