basesystems
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.BaseSystem

Description

This file provides methods for encodingdecoding binary data tofrom strings of digits in some basesystem. Digits can represent a sum of value placements (RadixSystem, eg: binary, base10) *OR* a concatination of fixed-width bit groups (BitwiseSystem, eg: base64, base32).

Synopsis

Documentation

type Encoder = ByteString -> String Source #

Function signature for encoding some ByteString to String of digits.

type Decoder = String -> Maybe ByteString Source #

Function signature for decoding some String of digits to ByteString, given all digits in String are valid Symbols.

class BaseSystem a where Source #

Type-class (interface) for implementing encode/decode functionality for some data structure w/ Alphabet a.

Methods

encoder :: a -> Encoder Source #

decoder :: a -> Decoder Source #

Instances

Instances details
BaseSystem BitwiseSystem Source #

Implements encoder/decoder for a BitwiseSystem.

Instance details

Defined in Data.BaseSystem

BaseSystem RadixSystem Source #

Implements BaseSystem for number systems built by modular arithmetic w/ the radix.

Instance details

Defined in Data.BaseSystem