Replace some instances of manual work with endianness with cryptic oneliners.
This changes code like
```pascal
RawRecord.RawData[NextOfs]:=Byte(ChunkStart);
RawRecord.RawData[NextOfs+1]:=Byte(ChunkStart shr 8);
RawRecord.RawData[NextOfs+2]:=Byte(ChunkStart shr 16);
RawRecord.RawData[NextOfs+3]:=Byte(ChunkStart shr 24);
```
to
```pascal
unaligned(PUint32(@RawRecord.RawData[NextOfs{..NextOfs+3}])^):=NtoLE(uint32(ChunkStart));
```
and, conversely,
```pascal
EnumeratedDataOffset := RawRec.RawData[NextOfs]+
(RawRec.RawData[NextOfs+1] shl 8)+
(RawRec.RawData[NextOfs+2] shl 16)+
(RawRec.RawData[NextOfs+3] shl 24);
```
to
```pascal
EnumeratedDataOffset := LEtoN(unaligned(PUint32(@RawRec.RawData[NextOfs{..NextOfs+3}])^));
```
saving 140 lines of code, though not in width and mainly in the DOS-related units no one will ever see.
Patch: [nton.patch](/uploads/2472eb9f67de4145c0d7ae618083cb05/nton.patch).
issue