|
|
|
|
|
by ksherlock
3863 days ago
|
|
slightly off topic, but... > Credit goes to ... Lee Smith for spotting the variable record format used to encode the file (an artifact of the VMS on Acorn's VAX that at first appeared to be widespread corruption of the file), These days, thanks to Unix and C I suppose, a file is just a collection of bytes. That wasn't always the case. Consider Pascal, where a file is a file of something (records, integers, etc). So, on VMS, you had streaming files (just a collection of bytes) but also RMS -- Record Management System -- files, which were files of records. There were fixed length records (the record size was probably stored in the file metadata) and variable size records (record size was stored inline, as a byte or word prefix before the record). You might think you're just writing data to a file, but you're writing records (the OS adds the prefix for variable records or 0-pads for fixed length). Then when reading, you might request xx bytes but it will only read one record at a time. (Kind of like how fgets() will stop reading when it finds a newline or a tcp socket will stop reading when it finds a PUSH.) There are advantages and disadvantages to this but if you're dealing with a VMS RMS file, you need to be aware or it will look corrupted. |
|