deltas: Heuristically detect endianness for older deltas
If the average object size is greater than 4GiB, let's assume we're dealing with opposite endianness. I'm fairly confident no one is going to be shipping peta- or exa- byte size ostree deltas, period. Past the gigabyte scale you really want bittorrent or something.
This commit is contained in:
1 parent
04d77da005
commit
7fdf072710
6 files changed
+89
-11
No files matched your search
@@ -222,11 +222,10 @@ maybe_swap_endian_u64 (gboolean swap,
|
||||
typedef enum {
|
||||
OSTREE_DELTA_ENDIAN_BIG,
|
||||
OSTREE_DELTA_ENDIAN_LITTLE,
|
||||
OSTREE_DELTA_ENDIAN_UNKNOWN,
|
||||
OSTREE_DELTA_ENDIAN_INVALID
|
||||
} OstreeDeltaEndianness;
|
||||
|
||||
OstreeDeltaEndianness _ostree_delta_get_endianness (GVariant *superblock);
|
||||
OstreeDeltaEndianness _ostree_delta_get_endianness (GVariant *superblock, gboolean *out_was_heuristic);
|
||||
|
||||
gboolean _ostree_delta_needs_byteswap (GVariant *superblock);
|
||||
|
||||
|
||||
Reference in new issue
Block a user