summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/blob.c b/src/blob.c
index 0b6efbf..83bcf80 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -98,6 +98,14 @@ int apk_blob_split(apk_blob_t blob, apk_blob_t split, apk_blob_t *l, apk_blob_t
}
}
+apk_blob_t apk_blob_pushed(apk_blob_t buffer, apk_blob_t left)
+{
+ if (buffer.ptr + buffer.len != left.ptr + left.len)
+ return APK_BLOB_NULL;
+
+ return APK_BLOB_PTR_LEN(buffer.ptr, left.ptr - buffer.ptr);
+}
+
unsigned long apk_blob_hash_seed(apk_blob_t blob, unsigned long seed)
{
unsigned long hash = seed;