# Binary VTP PolyData File to ASCII

**URL:** https://discourse.vtk.org/t/binary-vtp-polydata-file-to-ascii/4557
**Category:** Support
**Created:** [November 3, 2020, 1:06pm UTC](https://discourse.vtk.org/t/binary-vtp-polydata-file-to-ascii/4557 "2020-11-03T13:06:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bdumphart](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/c67d28/32.png) [@bdumphart](https://discourse.vtk.org/u/bdumphart)
#### Post date: [November 3, 2020, 1:06pm UTC](https://discourse.vtk.org/t/binary-vtp-polydata-file-to-ascii/4557/1 "2020-11-03T13:06:45Z")

</div>

Hi All!

I have a question about the .vtp file format and how i can decode the binary base64 encoded data into a readable ascii/float32 format. I have already done this step with the Python vtk library (that works fine) but my boss wants me to re-create the decoding mechanism of the base64 binary data so that everything works in Matlab and that he won´t need Python anymore for his pipeline. (Pls don´t ask me why i would not use python inside of matlab - it is just not the ‘optimal’ solution and i am just doing my given task 🙂 )

The file is a binary .vtp PolyData with a header and LittleEndian byte order. I understand the mechanism of the base64 encoding. But what i do not understand is how this file is beeing decoded or perhaps i am still missing somehting. The documentations are not very helpful in this matter.

1. What is the purpose of the header? (for example WNEBAA== with my understandig of decoding base64 this would be 88 - 209 - 1 - 0 in decimal (ASCII). Or do i have to turn the byte-order because it is LittleEndian? And what would these numbers tell me for the following data?

2. i have read something about a LookupTable, is there one for vtk/vtp Files that i am missing, and if so, where can i find the specific LookupTable that was used for the encdoing (if this is even possible?)

i can´t upload the files because i am a new user, but i could send it if they would help.

I think i am very close but there are still some things missing that i need to discover and would really appreciate your help here 🙂

Thank you very much!
