ilp_file_codec 1.0.0+1 ilp_file_codec: ^1.0.0+1 copied to clipboard
.ilp file codec.
Image Layers Package(.ilp) file codec #
Features #
This package is the .ilp file codec.
Work flows #
- Use the Photoshop plugin to export the config.json and some images files.
- Use ILP encoder encode the config.json to .ilp file.
- Use ILP decoder decode the .ilp file to data.
The .ilp file structure #
Part | Range | Length | Bytes Content | Gzip | Desc |
---|---|---|---|---|---|
A | 0 ~ 3 | 4 | [0x49, 0x4c, 0x50, 0x21] | Fixed file characteristics. convert to utf8 string: ILP! |
|
B | 5 ~ 8 | 4 | int32 value | Protobuf ILPInfo bytes length | |
C | 9 ~ 9+B | Part B int value | Protobuf ILPInfo bytes | ✔ | Check out protobuf |
D | 9+B+1 ~ end | dynamic | Protobuf ILPLayer bytes | ✔ | Check out protobuf |
Usage #
Check out the test/ilp_codec_test.dart file.
Before run the test #
-
Requirement: Open test.psd and use the Photoshop plugin export the files to the test folder.
-
Optional: Run the command to generate protobuf dart side code:
cd ./ilp_codec protoc -I .\protobuf --dart_out=.\lib\protobuf .\protobuf\*.proto
License #
MIT