title: Packing and unpacking *.obb file
body: <p>Good day! </p>
  
  <p>Lets say I have a directory named test. It contains several dirs and files in it.
  (dir_1: file_1, file_2 ;  dir_2: file_1, file_2; ... ;dir_5:file_1, file_2;)</p>
  
  <p>I do 
       jobb -d ./test -k key -o data.obb -pn com.example.obbtest -pv 1</p>
  
  <p>And get </p>
  
  <pre><code>Slop: 0   Directory Overhead: 0
  Slop: 37185   Directory Overhead: 2880
  Partial Sector [32] writing to sector: 199
  Partial Sector [32] writing to sector: 199
  Partial Sector [32] writing to sector: 199
  Partial Sector [96] writing to sector: 231
  Alignment off writing to sector: 231
  Partial Sector [96] writing to sector: 231
  Alignment off writing to sector: 231
  Partial Sector [96] writing to sector: 199
  Partial Sector [96] writing to sector: 235
  Alignment off writing to sector: 235
  Partial Sector [96] writing to sector: 235
  Alignment off writing to sector: 235
  Partial Sector [160] writing to sector: 231
  Alignment off writing to sector: 231
  Partial Sector [307] writing to sector: 8911
  Partial Sector [176] writing to sector: 17075
  Partial Sector [96] writing to sector: 17079
  Alignment off writing to sector: 17079
  Partial Sector [320] writing to sector: 235
  Alignment off writing to sector: 235
  Partial Sector [96] writing to sector: 17079
  Alignment off writing to sector: 17079
  Partial Sector [224] writing to sector: 231
  Alignment off writing to sector: 231
  Partial Sector [307] writing to sector: 25755
  Partial Sector [191] writing to sector: 33919
  Partial Sector [96] writing to sector: 33923
  Alignment off writing to sector: 33923
  Partial Sector [320] writing to sector: 235
  Alignment off writing to sector: 235
  Partial Sector [320] writing to sector: 17079
  Alignment off writing to sector: 17079
  //and so on
  </code></pre>
  
  <p>the file is ready.
  Than, as in </p>
  
  <pre><code>http://developer.android.com/tools/help/jobb.html
  </code></pre>
  
  <p>I do</p>
  
  <pre><code>jobb -d ./dotest/ -o data.obb -k key -pn com.example.obbtest -pv 1
  </code></pre>
  
  <p>And get:</p>
  
  <pre><code>Slop: 0   Directory Overhead: 0
  Slop: 0   Directory Overhead: 0
  Java.io.IOException: boot sector says there are 0 sectors per FAT
  at de.waldheinz.fs.fat.Fat.&lt;init&gt;(Fat.java:112)
  at de.waldheinz.fs.fat.Fat.create(Fat.java:96)
  at de.waldheinz.fs.fat.SuperFloppyFormatter.format(SuperFloppyFormatter.java:236)
  at com.android.jobb.Main.main(Main.java:414)
  </code></pre>
  
  <p>I guess it means I have don packing wrong.
  How can I ix that?</p>
  
  <p>UPADATE</p>
  
  <p>I do 
      jobb -d ./test/ -o my-app-assets.obb -pn com.examlpe.obbtest -pv 1 -k 11111111</p>
  
  <p>and that fine</p>
  
  <p>Than
      jobb -dump my-app-assets.obb -d ./undo/ -k 11111111</p>
  
  <p>And I get my files. BUT - they all are less than 1 mb. If I add file bigger than 1 mb I get </p>
  
  <pre><code> Package Name: com.example.obbtest 
  Package Version: 1
  SALT: -5c0a03daa17137e2
  
  6fbd61c113679c5258231a5439459dd5
  LFN = file1 (3rd copy).jpg / SFN = ShortName [?
  
                                       |/ifl -- 12 3f b 16 18 7c 10 2f 69 66 6c ]
  Partial read from sector: 179
  Exception in thread "main" java.nio.BufferOverflowException
  at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
  at java.nio.ByteBuffer.put(ByteBuffer.java:859)
  at  com.android.jobb.EncryptedBlockFile$    
     EncryptedBlockFileChannel.readDecryptedSector(EncryptedBlockFile.java:292)
  at com.android.jobb.EncryptedBlockFile$EncryptedBlockFileChannel. 
     read(EncryptedBlockFile.java:142)
  at de.waldheinz.fs.util.FileDisk.read(FileDisk.java:118)
  at de.waldheinz.fs.fat.ClusterChain.readData(ClusterChain.java:225)
  at de.waldheinz.fs.fat.FatFile.read(FatFile.java:126)
  at com.android.jobb.Main.dumpDirectory(Main.java:137)
  at com.android.jobb.Main.main(Main.java:315)
  </code></pre>