<div dir="ltr">You might be able to find some good comments or logic in that code base<div><br></div><div><a href="https://github.com/Kitware/vtk-js/blob/master/Sources/IO/XML/XMLReader/index.js#L142-L150">https://github.com/Kitware/vtk-js/blob/master/Sources/IO/XML/XMLReader/index.js#L142-L150</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 25, 2018 at 7:20 AM Edern Haumont <<a href="mailto:edern.haumont@kitware.com">edern.haumont@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>I am writing a python application which requires to send a stored compressed vtkImageData by block to a client.</div><div>I read on <a href="https://www.vtk.org/Wiki/VTK_XML_Formats" target="_blank">this</a> (<a href="https://www.vtk.org/Wiki/VTK_XML_Formats" target="_blank">https://www.vtk.org/Wiki/VTK_XML_Formats</a>) link (and by looking at the vtkXMLWriter source) that the actual data array is preceded by some header. Either :<br>- [#bytes]<i>[DATA] </i>if the data is not compressed</div><div>- [#blocks][#u-size][#p-size][#c-size-1][#c-size-2]...[#c-size-#blocks]<i>[DATA] </i>if it is compressed.</div><div><br></div><div>My problem : I did not succeed in manually reading those values, either in the uncompressed (binary or ascii) or compressed case. Does anyone have any pointer or example on how to do that ? I could not find a lot of documentation on the subject.<br></div><div><br></div><div>Also side question : I am not sure the ZLib compressor uses a full flush. If that is not the case, it seems impossible to read only one random data block. Am I right ?</div><div><br></div><div>Thanks a lot.</div><div>Bests.<br></div><div><br></div><div><div>-- <br><div dir="ltr" class="m_2752510747260671746gmail_signature"><div dir="ltr"><div>Edern Haumont<b><br></b></div><a href="mailto:edern.haumont@kitware.com" target="_blank"><u><i>edern.haumont@kitware.com</i></u></a><br></div></div></div></div></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>