I want to start working with Kaitai Struct , to handle binary files. Initially, it requires writing an .ksy file, which is then compiled into source code in any of the suggested languages ​​- Java, Ruby, HTML, C ++, Perl, PHP, Python. It is very convenient. I put my ready-made Java classes into the project, however these classes have objects of other "native classes" Kaitai Struct as fields:

Add a KS runtime to your project.

such as:

  • KaitaiStream.java
  • KaitaiStruct.java
  • ByteBufferKaitaiStream.java
  • RandomAccessFileKaitaiStream.java

Here I also cannot find them. I originally took it from a githaba , but it doesn't work. Where can I find these classes?

  • what build system do you use? - Mikhail Vaysman
  • @MikhailVaysman IntelliJ IDEA Ultimate 2017.1.2 - Kiryl Aleksandrovich

1 answer 1

The creator of the project has not yet released the release version of this library, but there is a snapshot and you can take it here , and then connect it in your IDE .

But a better option would be to set up the build system and let it pick up the files you need. For maven , add the following dependency

 <dependency> <groupId>io.kaitai</groupId> <artifactId>kaitai-struct-runtime</artifactId> <version>0.8-SNAPSHOT</version> </dependency> 

And specify the correct repository address

 <profiles> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> <repositories> <repository> <id>oss-snapshots</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> </profile> </profiles> 
  • This is a great answer, thanks! - Kiryl Aleksandrovich