summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/blob.c b/src/blob.c
index fc21467..f1fe221 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -492,6 +492,15 @@ err:
*b = APK_BLOB_NULL;
}
+int apk_blob_pull_blob_match(apk_blob_t *b, apk_blob_t match)
+{
+ if (b->len < match.len) return 0;
+ if (memcmp(b->ptr, match.ptr, match.len) != 0) return 0;
+ b->ptr += match.len;
+ b->len -= match.len;
+ return 1;
+}
+
static unsigned char b64decode[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,