summaryrefslogtreecommitdiff
path: root/include/squashfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/squashfs.h')
-rw-r--r--include/squashfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/squashfs.h b/include/squashfs.h
index fb60049..eb35fdd 100644
--- a/include/squashfs.h
+++ b/include/squashfs.h
@@ -21,6 +21,10 @@
#define SQFS_DEVBLK_SIZE 4096
#define SQFS_MAX_DIR_ENT 256
+#define SQFS_IS_BLOCK_COMPRESSED(size) (((size) & (1 << 24)) == 0)
+#define SQFS_ON_DISK_BLOCK_SIZE(size) ((size) & ((1 << 24) - 1))
+#define SQFS_IS_SPARSE_BLOCK(size) (SQFS_ON_DISK_BLOCK_SIZE(size) == 0)
+
typedef struct {
uint32_t magic;
uint32_t inode_count;