I need to implement in Delphi 2006 an algoritm that work in .net
Basicaly I need to do the next steps:
- Create an XML and validate aganist the XSD
- Serialize the XML string into an array of bytes UTF-8 encoded and compress it with zip
- The compressed info must be stored again into a array of bytes using base256 format
- Create an image using Datamatrix 2D BarCode from this array of bytes and put this image on a report
For step 1, I create the XML using NativeXML library that work ok. In this library exist a metod SaveToBinaryFile but don't work ok. In my tests I used this function to create a binary file. I was forced to use a binary file becouse my Zip component work only with files not with strings or aray of bytes from memory.
I compressed this binary file with the Zip component and loaded this compresed file into a blob file. At the moment when I need to create the DataMatrix image I load this blob file into an ansistring and I create the image.
After many tests I found that my fault is when I save my XML into the binary file. Now I need to found another way to save my xml (utf-8) string to a binarry file. Please sorry for my english. Can anyone help me?