bencoding-0.4.5.2: A library for encoding and decoding of BEncode data.

Copyright(c) Sam Truzjan 2013
LicenseBSD3
Maintainerpxqr.sta@gmail.com
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.BEncode.Internal

Contents

Description

This module provides bencode values serialization. Normally, you don't need to import this module, use BEncode instead.

Synopsis

Parsing

parser :: Parser BValue Source #

BEncode format parser according to specification.

parse :: ByteString -> Either String BValue Source #

Try to convert raw bytestring to bencoded value according to specification.

Rendering

builder :: BValue -> Builder Source #

BEncode format encoder according to specification.

build :: BValue -> ByteString Source #

Convert bencoded value to raw bytestring according to the specification.

ppBEncode :: BValue -> Doc Source #

Convert to easily readable JSON-like document. Typically used for debugging purposes.