eriktim/elm-protocol-buffers/1.2.0

Protobuf.Types.Int64

A simple 64-bit integer made up from two 32-bit integers. This is used by the int64 and related en/decoders. This module is intentionally kept sparse to achieve the following goals:

  • Support Int64 data types in elm-protocol-buffers
  • Don't add extra code or dependencies not required for the main goal of this package (serialization and deserialization)

If you find yourself needing extra logic/arithmetic revolving around 64-bit integers, please use one of the available packages providing what you need and convert with fromInts and toInts between the two data types.

Data Types

type alias Int64 =
Int64

The Int64 data type. Guarantees the invariant that the internal integers are kept between -2 ^ 31 and 2 ^ 31 - 1.

Conversions

fromInts : Int -> Int -> Int64

Build an Int64 from two Int values.

toInts : Int64 -> ( Int, Int )

Get the two Int values for higher and lower bits from an Int64.