memmapfile and importing big-endian data
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
D. Plotnick
el 11 de Abr. de 2017
Comentada: D. Plotnick
el 12 de Abr. de 2017
I need to import a large mixed-format binary file. This is best done using memmapfile. However, the data has also been written in big-endian.
Short of a time consuming loop through the 50,000 lines of the structure, and all of the associated structure fields, is there any way to reverse the endian-ness of everything that comes out of the Data field from memmapfile?
Alternatively, I could do some gruesome struct2cell juggling.Yuck.
Bottom line: is there a way to reverse the endian-ness of memmapfile? If not, that should be added.
0 comentarios
Respuesta aceptada
Steven Lord
el 12 de Abr. de 2017
I don't believe you can control whether memmapfile treats the file as little-endian or big-endian. You can use the swapbytes function on the data to flip it between the two endian-nesses.
Más respuestas (0)
Ver también
Categorías
Más información sobre Large Files and Big Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!