Hello all. I’m playing around with reading Z-machine story files for the first time in Java. I’ve got the following function which reads a word from the memory
int valueInMemory = (data[address] << 8 | (data[address + 1] & 0xff)) & 0xffff;
data is the story file read inn as a byte
Path path = Paths.get(filePath); byte data = Files.readAllBytes(path);
When i get the length from memory address 0x1A using this function I get that the length is 31231. Because the story file is an inform 5 file, I multiply this with 4 and get a length of 124924. Now the thing that confuses me is that if I run data.length in Java, I get back 124928. I expected this to be the same, but its actually 4 bytes larger. Is this to be expected?