These are 3x32bit big-endian integers at the beginning of each Physical Record.
This is the TIF set type, 0 for a normal TIF set. 1 for an EOF set.
This is the physical file location of the start of the previous set.
This is the physical file location of the start of the next set.
A dump looks like this:
0 1 2 3 4 5 6 7 8 9 A B C D E F
00000000: 00 00 00 00 00 00 00 00 4A 00 00 00 00 3E 00 00
00000010: 80 00 32 30 30 30 39 39 2E 44 41 54 20 20 20 20
00000020: 20 20 20 20 20 20 20 20 20 20 20 20 39 39 2F 30
00000030: 34 2F 32 39 20 20 31 30 32 34 20 20 20 20 20 20
00000040: 20 20 20 20 20 20 2E 20 20 20 00 00 00 00 00 00
00000050: 00 00 56 04 00 00 04 00 00 01 40 00 01 01 42 00
00000060: 02 01 42 00 03 04 49 00 00 02 34 04 01 42 01 05
...
00000450: 20 20 44 45 47 20 00 00 00 00 4A 00 00 00 62 08
00000460: 00 00 04 00 00 03 00 00 00 00 00 00 00 04 20 20
00000470: 00 01 44 20 20 20 20 20 31 30 41 20 20 20 20 20
...
00000860: 46 4E 00 00 00 00 56 04 00 00 6E 0C 00 00 04 00
00000870: 00 03 4F 52 20 20 20 20 20 20 20 20 20 20 20 20
...
...
...
0016E770: 18 00 BA 83 18 00 00 00 00 00 30 E5 16 00 C0 E7
0016E780: 16 00 00 3E 00 00 81 00 32 30 30 30 39 39 2E 44
...
0016E7B0: 20 20 20 20 20 20 20 20 20 20 20 20 2E 20 20 20
0016E7C0: 01 00 00 00 76 E7 16 00 CC E7 16 00 01 00 00 00
0016E7D0: C0 E7 16 00 D8 E7 16 00
Or:
tell() TIF type TIF back TIF next
00000000: 00 00 00 00 00 00 00 00 00 00 00 4A
0000004A: 00 00 00 00 00 00 00 00 00 00 04 56
00000456: 00 00 00 00 00 00 00 4A 00 00 08 62
00000862: 00 00 00 00 00 00 04 56 00 00 0C 6E
...
0016E776: 00 00 00 00 00 16 E5 30 00 16 E7 C0
0016E7C0: 00 00 00 01 00 16 E7 76 00 16 E7 CC
0016E7CC: 00 00 00 01 00 16 E7 C0 00 16 E7 D8
0016E7D8: EOF
Specialisation of exception for Physical Records.
The maximum possible size of the first ‘next’ word. If larger than this then the words are written wrongly as little-endian and need to be reversed This is calculated as the maximum PR length + TIF bytes.
Number of words in a TIF marker
Number of bytes in a TIF marker
struct.Struct() format for a TIF marker
struct.Struct() format for a TIF marker written wrongly as little-endian
Number of bytes in a TIF word
struct.Struct() format for a TIF word
struct.Struct() format for a TIF word written wrongly as little-endian
Base class for TIF markers.
True if I have encountered a EOF marker.
Current values of markers as a tuple of three integers.
Reports the error. I constructed with raiseOnError as True this will raise a ExceptionTifMarker otherwise it will write the error to the log.
Resets the TIF markers to all zero, this means hasPrevious is False.
Header string for an ASCII dump.
Class for reading TIF markers. This will automatically determine if TIF markers are present and automatically correct ill-formed little-endian TIF markers.
theStream - the file stream.
allowPrPadding - If True this will consume spurious padding bytes after the Physical Record tail i.e. the TIF markers determine the Physical Record structure rather than the Physical Record Headers.
True if a Physical Record has been read, cleared on reset().
Read TIF markers from a RawStream object. Returns the stream tell() or None of the start of the TIF marker. This is not necessarily the same as the stream tell() seen by the caller as we might consume PR padding.
Calling reset() means that the caller is probably randomly accessing the file so we can not error check the previous marker in the same way that we can if we are reading the file linearly.