ah, yes. probably that is the one-off mistake int ;) Peter
On 01.07.2015 19:53, John Zhao wrote: > Hi Peter, > > No. The header size is 20 now. > I think we can just put the extra int to header array, make it header[21]. > > Now, there is a hole from 96-100 bytes on the header. > :) > not big deal. > > *Best Regards,* > *ZhiQiang ZHAO* > > On Tue, Jun 30, 2015 at 11:06 PM, Peter <[email protected] > <mailto:[email protected]>> wrote: > > You mean adding it as a separate header variable? > > Regards, > Peter > > > On 01.07.2015 08:02, John Zhao wrote: >> Hi Peter, >> >> Thanks for your reply. >> I think we can add it to headers[21]. >> But nvm, not big deal. >> >> *Best Regards,* >> *ZhiQiang ZHAO* >> >> On Tue, Jun 30, 2015 at 10:55 PM, Peter <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi John, >> >> yes, this is a bit waste of space :) >> >> But the empty space is to avoid thinking about header size in >> the consuming class but mainly to avoid breaking the file >> format when we insert new data there. >> >> Regards, >> Peter >> >> >> On 01.07.2015 02:04, John Zhao wrote: >>> Hi, >>> >>> /** >>> * Writes some internal data into the beginning of the specified >>> file. >>> */ >>> protected void writeHeader( RandomAccessFile file, long length, int >>> segmentSize ) throws IOException >>> { >>> file.seek(0); >>> file.writeUTF("GH*”*); // 4 bytes >>> file.writeLong(length); // 8 bytes >>> file.writeInt(segmentSize); // 4 bytes >>> for (int i = 0; i < header.length; i++) >>> { >>> file.writeInt(header[i]); >>> } >>> } >>> >>> it's totally 100 bytes. >>> We only use 96 bytes of them. >>> >>> It's not a problem. >>> Just curious. >>> >>> It's better to use them all, to reduce any further question. :) >>> >>> *Best Regards,* >>> *ZhiQiang ZHAO* >>> > > > _______________________________________________ > GraphHopper mailing list > [email protected] <mailto:[email protected]> > https://lists.openstreetmap.org/listinfo/graphhopper > > > > > _______________________________________________ > GraphHopper mailing list > [email protected] > https://lists.openstreetmap.org/listinfo/graphhopper
_______________________________________________ GraphHopper mailing list [email protected] https://lists.openstreetmap.org/listinfo/graphhopper
