scale-1.0.0.0: SCALE v2.0 codec for Haskell Web3 library.
CopyrightAleksandr Krupenkin 2016-2021
LicenseApache-2.0
Maintainermail@akru.me
Stabilityexperimental
Portabilitynoportable
Safe HaskellNone
LanguageHaskell2010

Codec.Scale.Compact

Description

Efficient general integer codec.

Synopsis

Documentation

newtype Compact a Source #

A "compact" or general integer encoding is sufficient for encoding large integers (up to 2**536) and is more efficient at encoding most values than the fixed-width version.

Constructors

Compact 

Fields

Instances

Instances details
Eq a => Eq (Compact a) Source # 
Instance details

Defined in Codec.Scale.Compact

Methods

(==) :: Compact a -> Compact a -> Bool #

(/=) :: Compact a -> Compact a -> Bool #

Ord a => Ord (Compact a) Source # 
Instance details

Defined in Codec.Scale.Compact

Methods

compare :: Compact a -> Compact a -> Ordering #

(<) :: Compact a -> Compact a -> Bool #

(<=) :: Compact a -> Compact a -> Bool #

(>) :: Compact a -> Compact a -> Bool #

(>=) :: Compact a -> Compact a -> Bool #

max :: Compact a -> Compact a -> Compact a #

min :: Compact a -> Compact a -> Compact a #

Show a => Show (Compact a) Source # 
Instance details

Defined in Codec.Scale.Compact

Methods

showsPrec :: Int -> Compact a -> ShowS #

show :: Compact a -> String #

showList :: [Compact a] -> ShowS #

Integral a => Decode (Compact a) Source # 
Instance details

Defined in Codec.Scale.Compact

Methods

get :: Get (Compact a) Source #

Integral a => Encode (Compact a) Source # 
Instance details

Defined in Codec.Scale.Compact

Methods

put :: Putter (Compact a) Source #