Команда: bin-to-src
sfk bin-to-src [...] infile outfile namePrefix
create sourcefile containing a binary data block. the outfile
will contain variable definitions beginning with namePrefix.
options
-java create java source code output, default is C.
-class java: create a fully compilable class with a short
demo source code how to write the data to a file.
-pack C source: compress data with a simple RLE scheme.
-hex C source: produce hex numbers instead of decimal.
-append do not overwrite output, but append to it.
-recsize=n java: define number of bytes per record used
within the raw data. default is 500. higher values
produce less records, which may help if you get
a "code too large" error during java compile.
further commands
sfk clipsrc convert clipboard text to C style source code
sfk clipphp convert clipboard text to PHP style source code
sfk clipjava convert clipboard text to Java style source code
... add +toclip to copy converted result back to clipboard.
web reference
http://stahlworks.com/sfk-bintosrc
examples
sfk bin-to-src myimg.dat imgsrc.cpp img01
create C source code containing content from myimg.dat.
sfk bin-to-src -java -class myimg.dat imgdata.java imgdata
create a Java class "imgdata" with myimg.dat content.