How to do things
AI Noob vs. Pro

List biggest files
List newest files
Show subdir sizes
Search in files
Replace word in files
List dir differences
Send files in LAN

Free Open Source:

Swiss File Knife

a command line
multi function tool.

remove tabs
list dir sizes
find text
filter lines
find in path
collect text
instant ftp or
http server
file transfer
send text
patch text
patch binary
run own cmd
convert crlf
dup file find
md5 lists
fromto clip
hexdump
split files
list latest
compare dirs
save typing
trace http
echo colors
head & tail
dep. listing
find classes
speed shell
zip search
zip dir list

Depeche View
Source Research
First Steps

windows GUI
automation

command line
file encryption

free external tools,
zero install effort,
usb stick compliant:

zip and unzip
diff and merge
reformat xml
reformat source

cpp sources

log tracing
mem tracing
hexdump
using printf

articles

embedded
stat. c array
stat. java array
var. c array
var. java array
view all text
as you type
surf over text
find by click
quick copy
multi view
find nearby
fullscreen
bookmarks
find by path
expressions
location jump
skip accents
clip match
filter lines
edit text
highlight
load filter
hotkey list
receive text
send in C++
send in Java
smooth scroll
touch scroll
fly wxWidgets
fly over Qt
search Java

convert binary data into java or c++ sourcecode for easy integration in your project, with the free sfk bin-to-src command for Windows, Mac OS X, Linux and Raspberry Pi.
  • Download the free Swiss File Knife Base from Sourceforge.
  • Open the Windows CMD command line, Mac OS X Terminal or Linux shell.
  • OS X : type mv sfk-mac-64.exe sfk and chmod +x sfk then ./sfk
  • Linux: type mv sfk-linux-64.exe sfk and chmod +x sfk then ./sfk. OS X and Linux syntax may differ, check the help within the tool.
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.
 
C++ example output: (reduced at "...")

   #define pic01_BLOCK_SIZE 1105
   
   static unsigned char pic01_abRawBlock[1105] = {
   255,216,255,224,0,16,74,70,73,70,0,1,1,1,0,96,0,96,0,0,
   255,219,0,67,0,4,3,3,4,3,3,4,4,4,4,5,5,4,5,7,11,7,7,6,6,
   7,14,10,10,8,11,16,14,17,17,16,14,16,15,18,20,26,22,18,
   ...
   15,84,235,10,161,46,224,39,191,140,210,163,56,135,203,
   255,217,
   };

Java example output: (reduced at "...")

   public static int pic01_BlockSize = 1105;
   static String pic01_RawBlock[] = {
   "\uffd8\uffe0\u0010\u4a46\u4946\u0001\u0101 ...",
   "\u3f02\ue4a9\ud54a\u2a65\u84b4\u8dde\ud7d4 ...",
   "\u581b\u06e2\ua9f2\u64e7\u56ac\u840d\u8419 ...",
   };

   public static byte[] pic01_getBlock() {
      int iout=0, nblen=pic01_BlockSize;
      char atmp[] = new char[500];
      byte aout[] = new byte[nblen];
      for (int i=0; i> 8);
            byte blo = (byte)(c >> 0);
            aout[iout++] = bhi;
            if (iout < nblen)
               aout[iout++] = blo;
         }
      }
      return aout;
   }
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.
 
C++ example output: (reduced at "...")

   #define pic01_BLOCK_SIZE 1105
   
   static unsigned char 
   pic01_abRawBlock[1105] = { 255,216,255,
   224,0,16,74,70,73,70,0,1,1,1,0,96,0,96,0,
   0, 255,219,0,67,0,4,3,3,4,3,3,4,4,4,4,5,
   5,4,5,7,11,7,7,6,6, 7,14,10,10,8,11,16,
   14,17,17,16,14,16,15,18,20,26,22,18, ...
   15,84,235,10,161,46,224,39,191,140,210,
   163,56,135,203, 255,217, };

Java example output: (reduced at "...") public static int pic01_BlockSize = 1105; static String pic01_RawBlock[] = { "\uffd8\uffe0\u0010\u4a46\u4946\u0001\ u0101 ...", "\u3f02\ue4a9\ud54a\u2a65\ u84b4\u8dde\ud7d4 ...", "\u581b\u06e2\ ua9f2\u64e7\u56ac\u840d\u8419 ...", }; public static byte[] pic01_getBlock() { int iout=0, nblen=pic01_BlockSize; char atmp[] = new char[500]; byte aout[] = new byte[nblen]; for (int i=0; i> 8); byte blo = (byte)(c >> 0); aout[iout++] = bhi; if (iout < nblen) aout[iout++] = blo; } } return aout; }

you are viewing this page in mobile portrait mode with a limited layout. turn your device right, use a desktop browser or buy the sfk e-book for improved reading.

 
sfk is a free open-source tool, running instantly without installation efforts. no DLL's, no registry changes - just get sfk.exe from the zip package and use it (binaries for windows, linux and mac are included).

 

the Endless Image 🍣 Sushi