-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We currently return the compatibility list as a vector of String:
Lines 326 to 332 in 0130714
| // This field is encoded as a four byte string of ISO 646 characters. | |
| pub fn compatibility_list(&self) -> Vec<String> { | |
| self.compatibility_list | |
| .iter() | |
| .map(|c| str::from_utf8(c).unwrap().to_owned()) | |
| .collect() | |
| } |
There is data that won't quite map across, such as most of the samples. They have two entries in the list, one of which looks like 0x00 0x00 0x00 0x01:
0000000 00 00 00 0c 6a 50 20 20 0d 0a 87 0a 00 00 00 18 >....jP ........<
0000020 66 74 79 70 6a 70 32 20 00 00 00 00 00 00 00 01 >ftypjp2 ........<
0000040 6a 70 32 20 00 00 01 b7 78 6d 6c 20 3c 3f 78 6d >jp2 ....xml <?xm<
I think that is marginal for compliance. Its not really a string of ISO 646 characters, but it is in the range of values given in Table I.4 for CLi.
In any case, its in the data.
So options:
- Change the API to return vector of
[u8;4]instead of String - Add API to return vector of
[u8;4], while keeping existing API - Change the API to return vector of
u32instead of String - Add API to return vector of
u32, while keeping existing API - Ignore the weird value on parsing
- Ignore the weird value if it looks like a count of the remaining entries.
- Something else
Metadata
Metadata
Assignees
Labels
No labels