Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

BinaryReader

A Elixir Binary Reader that running WITH side effects.

Installation

defdepsdo[{:binary_reader,"~> 0.1.0"}]end

Usage

Normal Usage

iex>{:ok,pid}=BinaryReader.start_link(<<65,66,67,68,2,0,0,0>>){:ok,#PID<0.0.0>}iex>BinaryReader.read_string(pid)"ABCD"
iex>BinaryReader.remains_byte_size(pid)4
iex>BinaryReader.read_int32(pid)2
iex>BinaryReader.stop(pid):ok

Extend BinaryReader

defmoduleSpecialBinaryReaderdouseBinaryReaderdefspecial_read(pid)dolength=read_int32(pid)read_bytes(pid,length)endendiex>{:ok,pid}=SpecialBinaryReader.start_link(<<.....>>)iex>SpecialBinaryReader.special_read(pid)

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages