GitXplorerGitXplorer
a

bytestream

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
bca022899005737594f23964e4ff5e87c8c22fbf

Update README.md

aamaanq committed 2 years ago
Unverified
cde3fc2cde8c08de2aaa633a9feaf97bef896db7

commented out closed source functions

aamaanq committed 3 years ago
Verified
4cb5b9a516a687c51842639c1ee469966fb7377e

Update README.md

aamaanq committed 3 years ago
Verified
c3d754d6c6f4daaea0bc6928b7af3bc0054fe23a

Update README.md

aamaanq committed 3 years ago
Unverified
3f10c1254a5faa8e0bf9ff0cd6f58430b010a804

Revert "Revert "reader to buffer, allows calling .Bytes()""

aamaanq committed 3 years ago
Unverified
51bd2b508eca189dbc04745b4f7b545232f1abc2

Revert "reader to buffer, allows calling .Bytes()"

aamaanq committed 3 years ago

README

The README file for this repository.

Package bytestream

This package is 100% compatible with the stdlib and mainly works with the bytes.Buffer and bytes.Reader interfaces.

Installation

go get -u github.com/amaanq/bytestream

Usage

import (
    "github.com/amaanq/bytestream"
)

func main() {
	Writer := &bytestream.Writer{
		buffer: bytes.NewBuffer([]byte{}),
	}
	Writer.WriteCompressedString("hello there!")
	Writer.WriteInt32(40, bytestream.BigEndian)
	// You've now packed hello there! and 40 into a very small byte array to do with what you please..
}

NOTE: This package is a custom protocol defined by a game company for their TCP data streams.


As such, I do not recommend using it to detect/use with protocols already implemented. However, you can use this for your own protocol for whatever it may be.


LogicLongs are now in the public domain seeing as several other public repositories explain them and showcase how to pack/unpack them.


Enjoy using this!