Make that âPharo.image' asFileReference binaryReadStreamDo: [ :stream | (stream next: 4) reversed asInteger ].
On 17 Dec 2015, at 14:28, Sven Van Caekenberghe <sven@stfx.eu> wrote:
âPharo.image' asFileReference binaryReadStreamDo: [ :stream | (stream next: 4) reserved asInteger ].
On 17 Dec 2015, at 14:25, Esteban Lorenzano <estebanlm@gmail.com> wrote:
âPharo.image' asFileReference readStreamDo: [ :stream | (stream binary; next: 4) longAt: 1 bigEndian: false ].
On 17 Dec 2015, at 13:26, Guillermo Polito <guillermopolito@gmail.com> wrote:
Iâd prefer the new API that does not use MultiByteFileStream and friends :)
version := nil. (File named: 'Pharo.image') readStreamDo: [ :stream | version := (stream next: 4) longAt: 1 bigEndian: false ]. version
On 17 dic 2015, at 1:20 p.m., Stephan Eggermont <stephan@stack.nl> wrote:
On 17-12-15 12:53, Guillermo Polito wrote:
Hmm, usually an image file has a header that describes some meta data about the image: version, some VM options, size of the imageâ¦
byteStream := FileStream fileNamed: '/home/stephan/.local/share/Pharo/images/50305/50305.image'. byteStream binary. version := byteStream nextLittleEndianNumber: 4. byteStream close. version
6505
That supports deciding which vm to use
Stephan