ilp_file_codec 1.0.4 copy "ilp_file_codec: ^1.0.4" to clipboard
ilp_file_codec: ^1.0.4 copied to clipboard

.ilp file codec.

Image Layers Package(.ilp) file codec #

Features #

This package is the .ilp file codec.

Work flows #

  1. Use the Photoshop plugin to export the config.json and some images files.
  2. Use ILP encoder encode the config.json to .ilp file.
  3. 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 strings.
convert to utf8 is: ILP!
B 4 ~ 7 4 int32 value Protobuf ILPHeader bytes length
C 8 ~ 8+C Part B int value Protobuf ILPHeader bytes Check out protobuf
D 7+C+1 ~ dynamic dynamic Protobuf ILPInfo(List) bytes Check out protobuf
E dynamic ~ end dynamic Protobuf ILPLayer(List) 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