Coder Social home page Coder Social logo

Write binary format spec about hive HOT 1 CLOSED

joeblew99 avatar joeblew99 commented on July 21, 2024
Write binary format spec

from hive.

Comments (1)

simc avatar simc commented on July 21, 2024

I haven't started to document the binary format.

It looks like this:

Each key-value combination is called frame. Each frames has four components:

1. Frame header:


uint32 frame lenght

uint8 key type

2. key

string key:


unit8 key lenght

uint8 keyChar1

...

uint8 keyCharN

int key:


uint32 key

 

3. value

Ints and doubles are always stored as 8-byte double

Lists, Maps and Strings have an uint32 which contains the length.


uint32 listLength

float64 value1

...

float64 valueN


uint32 stringLength (in bytes)

uint8 codeUnit1

...

uint8 codeUnitN

Non primitive lists and primitive lists which contain at least one null value store the type of each element:


uint32 listLength

uint8 type1

any value1

...

uint8 typeN

any valueN

4. Checksum

Each frame ends with a 4-byte checksum (CRC32) of all other bytes (including the 4 length bytes)

Sorry, I know this is not much information but it's all I got atm.

You can find most of the implementation in the Frame class, the BinaryReaderImpl and the BinaryWriterImpl.

Don't hesitate to ask if you have problems.

from hive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.