(4 Kb)
Updated: 05/22/17 01:40 PM
File Info
Morrowind (3.0)
Homestead (2.7)
Updated:05/22/17 01:40 PM
Created:03/19/17 11:40 PM
Monthly downloads:53
Total downloads:200
Version: 1.01
by: Rhyono [More]
This library was designed for compressing large amounts of binary data into small spaces. For example, research and recipe knowledge sharing would benefit from this.

It uses a custom base-256 encoding, specially tailored to ESO's character set support. I've tested it extensively, but encoding is messy business, so only time will tell if there are any issues.

How to Use
The main functionality of course is to compress binary data into a data string that can be entered into text fields in ESO.


lua Code:
  1. LBE:encode(binary)

The "binary" can be a number (not recommended), a string or a table of boolean values. It will handle the conversion from the table, so you do not need to worry about whether it is a numeric or boolean binary value.


lua Code:
  1. LBE:decode(base256)

The "base256" must be a string or number (not recommended). I may implement table support later if there's a valid reason to do so.

These are functions that you don't necessarily need but I found useful:

lua Code:
  1. LBE:IsTrue(boolean) OR IsTrue(boolean)

IsTrue will take a value and determine if it is true. Unlike Lua's default, it evaluates 0 and empty strings as false.

lua Code:
  1. LBE:NumBool(boolean) OR NumBool(boolean)

NumBool will take a value (assumed boolean) and return 0 or 1. When combined with doing your boolean checks using IsTrue, it allows saving booleans as a single byte instead of multiple in savedvars, which adds up for addons using a lot of booleans.

How to Include
Warning: Spoiler
Version 1.01 - API bump
Optional Files (0)

Archived Files (1)
File Name
03/20/17 12:15 AM

Post A Reply Comment Options
Unread 03/21/17, 09:17 AM  
AddOn Author - Click to view AddOns

Forum posts: 239
File comments: 318
Uploads: 15
That looks like a byte per boolean, right? This is designed for purely boolean data and as such compresses it to a bit per boolean. I don't believe MessagePack could fit everything into a guild note (254 character).
Report comment to moderator  
Reply With Quote
Unread 03/21/17, 12:49 AM  
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 38
Uploads: 7
What is the advantage of this over using a popular implementation such as MessagePack? http://msgpack.org/index.html http://fperrad.github.io/lua-MessagePack/ -- in theory this should be able to just run since it is purely Lua (or Lua-like) implementation without any extra dependencies. The downside is we can't really benefit from choosing our own JIT such as LuaJIT.

Cool idea -- good work!
Report comment to moderator  
Reply With Quote
Post A Reply

Category Jump: