title: How to revert an unpacking script
body: <p>In order to test some stuff on my TomTom, I would like to modify some files inside a TomTom Package (.ttpkg).
  I have found a script doing this here : <a href="https://github.com/egonalter/R-Link-RE/blob/master/download_firmware.sh" rel="nofollow">https://github.com/egonalter/R-Link-RE/blob/master/download_firmware.sh</a></p>
  
  <pre><code>    while :; do
     dd conv=notrunc bs=102400 iflag=skip_bytes,fullblock \
         oflag=append skip=20 count=1 2&gt;&amp;1 &gt;&amp;3 | grep 0+1 &amp;&amp; break
  done &lt; &lt;(tail -c +9 $ROM) 3&gt;&amp;1 | tail -c +55 &gt; $ROM2.tar
  </code></pre>
  
  <p>but I now need to "repack" everything. My problem is that I don't really know how to do this.
  The script basicly skips 20 bytes every 102400 bytes.
  My idea is to read the new tar file and add those 20 extra bytes every 102400 bytes. For this, I first need to save them when they are skipped when unpacking, and then add then back when repacking.
  Any idea on how to do this ?</p>
  
  <p>Many thanks :)</p>
  
  <p>Tristan</p>