Skip to content

SunIandingBicycle-R-D-Center/j2struct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

j2struct

use java to parse the binary struct of "C/C++"

example

if you have a gay colleague, he is the R&D position of "C/C++", because of some businesses, he wrote binary files using structure.

view the following c/c++ code

image image

you need to read this binary file, but you only know "java" language.

you: "oh, my God, what should I do"

don't worry, j2struct helps you. XDDDDDDDDDD

view the following java code

image image image image

is it very cool?

it may also be very backward! XDDDDDDD

use

J2Struct.readStruct(); or J2Struct.readSturctAutoAlign(); not StructUtil

if your Class needs to be used as a structure object, use annotation @Struct(index=0).

your Class attribute needs to be used as a structure attribute. please use the corresponding annotation. the index configuration represents the order of attributes in the structure

j2struct can not only read struct binary, but also write struct binary!

j2struct supports all basic types

image

About

use java to parse the binary struct of "C/C++"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages