Practical way to encode binary data in XML files meant for editing by hand? -


I have to edit some dirty binary files in proprietary format, so I wrote the converter between this binary format and XML. Now I can edit interesting bits, but unfortunately this format embeds many raw binary data - I need to keep it where it is (or else return to conversion), but it is not possibly editable anyway , So I want to see it as low as possible.

What is the easiest way to make these types of blobs as minimal, and reducing the likelihood of such blob being accidentally damaged? I am thinking gzip + base64 and putting checksum and size in properties of blob tag - or is there a more sensible way?

If blobs can be easily re-presented from the original file, then you only It may be mentioned that something like

  & lt; Blob start = "1000" end = "2000" />  

or

  & lt; Blob seq = '1' / & gt; # Other files: 1 1000 2000  

Update:

As the original files will be deleted (see comments), use as mentioned above will not be done.

This will work:

  & lt; Blob start = '0' end = '1000' / & gt; # Based on other file space / time requirements, you can either compress anything #, compress the whole file, or insert each blob if you need a single file output , You can also embed it in XML with another file (encoding & nbsp; + checksum). But this is not much improvement in your original idea. 


Comments