diff --git a/src/config/config_archive.c b/src/config/config_archive.c
index eceebae..84f21b9 100644
--- a/src/config/config_archive.c
+++ b/src/config/config_archive.c
@@ -34,3 +34,6 @@
 #ifdef IMAGE_ZLIB
 REQUIRE_OBJECT ( zlib );
 #endif
+#ifdef IMAGE_GZIP
+REQUIRE_OBJECT ( gzip );
+#endif
diff --git a/src/config/general.h b/src/config/general.h
index d665379..fcfbaf5 100644
--- a/src/config/general.h
+++ b/src/config/general.h
@@ -118,6 +118,7 @@
 #define	IMAGE_DER		/* DER image support */
 #define	IMAGE_PEM		/* PEM image support */
 #define	IMAGE_ZLIB		/* ZLIB image support */
+#define	IMAGE_GZIP		/* GZIP image support */
 
 /*
  * Command-line commands to include
diff --git a/src/image/gzip.c b/src/image/gzip.c
new file mode 100644
index 0000000..4072813
--- /dev/null
+++ b/src/image/gzip.c
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2021 Michael Brown <mbrown@fensystems.co.uk>.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * You can also choose to distribute this program under the terms of
+ * the Unmodified Binary Distribution Licence (as given in the file
+ * COPYING.UBDL), provided that you have satisfied its requirements.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <stdlib.h>
+#include <errno.h>
+#include <assert.h>
+#include <ipxe/deflate.h>
+#include <ipxe/uaccess.h>
+#include <ipxe/image.h>
+#include <ipxe/zlib.h>
+#include <ipxe/gzip.h>
+
+/** @file
+ *
+ * gzip compressed images
+ *
+ */
+
+/**
+ * Extract gzip image
+ *
+ * @v image		Image
+ * @v extracted		Extracted image
+ * @ret rc		Return status code
+ */
+static int gzip_extract ( struct image *image, struct image *extracted ) {
+	struct gzip_header header;
+	struct gzip_extra_header extra;
+	struct gzip_crc_header crc;
+	struct gzip_footer footer;
+	struct deflate_chunk in;
+	unsigned int strings;
+	size_t offset;
+	size_t len;
+	off_t nul;
+	int rc;
+
+	/* Sanity check */
+	assert ( image->len >= ( sizeof ( header ) + sizeof ( footer ) ) );
+
+	/* Extract footer */
+	len = ( image->len - sizeof ( footer ) );
+	copy_from_user ( &footer, image->data, len, sizeof ( footer ) );
+
+	/* Extract fixed header */
+	copy_from_user ( &header, image->data, 0, sizeof ( header ) );
+	offset = sizeof ( header );
+	assert ( offset <= ( image->len - sizeof ( footer ) ) );
+
+	/* Skip extra header, if present */
+	if ( header.flags & GZIP_FL_EXTRA ) {
+		copy_from_user ( &extra, image->data, offset,
+				 sizeof ( extra ) );
+		offset += sizeof ( extra );
+		offset += le16_to_cpu ( extra.len );
+		if ( offset > len ) {
+			DBGC ( image, "GZIP %p overlength extra header\n",
+			       image );
+			return -EINVAL;
+		}
+	}
+	assert ( offset <= ( image->len - sizeof ( footer ) ) );
+
+	/* Skip name and/or comment, if present */
+	strings = 0;
+	if ( header.flags & GZIP_FL_NAME )
+		strings++;
+	if ( header.flags & GZIP_FL_COMMENT )
+		strings++;
+	while ( strings-- ) {
+		nul = memchr_user ( image->data, offset, 0, ( len - offset ) );
+		if ( nul < 0 ) {
+			DBGC ( image, "GZIP %p overlength name/comment\n",
+			       image );
+			return -EINVAL;
+		}
+		offset = ( nul + 1 /* NUL */ );
+	}
+	assert ( offset <= ( image->len - sizeof ( footer ) ) );
+
+	/* Skip CRC, if present */
+	if ( header.flags & GZIP_FL_HCRC ) {
+		offset += sizeof ( crc );
+		if ( offset > len ) {
+			DBGC ( image, "GZIP %p overlength CRC header\n",
+			       image );
+			return -EINVAL;
+		}
+	}
+
+	/* Initialise input chunk */
+	deflate_chunk_init ( &in, userptr_add ( image->data, offset ), 0, len );
+
+	/* Presize extracted image */
+	if ( ( rc = image_set_len ( extracted,
+				    le32_to_cpu ( footer.len ) ) ) != 0 ) {
+		DBGC ( image, "GZIP %p could not presize: %s\n",
+		       image, strerror ( rc ) );
+		return rc;
+	}
+
+	/* Decompress image (expanding if necessary) */
+	if ( ( rc = zlib_deflate ( DEFLATE_RAW, &in, extracted ) ) != 0 ) {
+		DBGC ( image, "GZIP %p could not decompress: %s\n",
+		       image, strerror ( rc ) );
+		return rc;
+	}
+
+	return 0;
+}
+
+/**
+ * Probe gzip image
+ *
+ * @v image		gzip image
+ * @ret rc		Return status code
+ */
+static int gzip_probe ( struct image *image ) {
+	struct gzip_header header;
+	struct gzip_footer footer;
+
+	/* Sanity check */
+	if ( image->len < ( sizeof ( header ) + sizeof ( footer ) ) ) {
+		DBGC ( image, "GZIP %p image too short\n", image );
+		return -ENOEXEC;
+	}
+
+	/* Check magic header */
+	copy_from_user ( &header.magic, image->data, 0,
+			 sizeof ( header.magic ) );
+	if ( header.magic != cpu_to_be16 ( GZIP_MAGIC ) ) {
+		DBGC ( image, "GZIP %p invalid magic\n", image );
+		return -ENOEXEC;
+	}
+
+	return 0;
+}
+
+/** gzip image type */
+struct image_type gzip_image_type __image_type ( PROBE_NORMAL ) = {
+	.name = "gzip",
+	.probe = gzip_probe,
+	.extract = gzip_extract,
+};
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h
index 35b03fe..90c91cd 100644
--- a/src/include/ipxe/errfile.h
+++ b/src/include/ipxe/errfile.h
@@ -303,6 +303,7 @@
 #define ERRFILE_pem		      ( ERRFILE_IMAGE | 0x00090000 )
 #define ERRFILE_archive		      ( ERRFILE_IMAGE | 0x000a0000 )
 #define ERRFILE_zlib		      ( ERRFILE_IMAGE | 0x000b0000 )
+#define ERRFILE_gzip		      ( ERRFILE_IMAGE | 0x000c0000 )
 
 #define ERRFILE_asn1		      ( ERRFILE_OTHER | 0x00000000 )
 #define ERRFILE_chap		      ( ERRFILE_OTHER | 0x00010000 )
diff --git a/src/include/ipxe/gzip.h b/src/include/ipxe/gzip.h
new file mode 100644
index 0000000..c8cf641
--- /dev/null
+++ b/src/include/ipxe/gzip.h
@@ -0,0 +1,71 @@
+#ifndef _IPXE_GZIP_H
+#define _IPXE_GZIP_H
+
+/** @file
+ *
+ * gzip compressed images
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <stdint.h>
+#include <ipxe/image.h>
+
+/** gzip header */
+struct gzip_header {
+	/** Magic ID */
+	uint16_t magic;
+	/** Compression method */
+	uint8_t method;
+	/** Flags */
+	uint8_t flags;
+	/** Modification time */
+	uint32_t mtime;
+	/** Extra flags */
+	uint8_t extra;
+	/** Operating system */
+	uint8_t os;
+} __attribute__ (( packed ));
+
+/** Magic ID */
+#define GZIP_MAGIC 0x1f8b
+
+/** Compression method */
+#define GZIP_METHOD_DEFLATE 0x08
+
+/** CRC header is present */
+#define GZIP_FL_HCRC 0x02
+
+/** Extra header is present */
+#define GZIP_FL_EXTRA 0x04
+
+/** File name is present */
+#define GZIP_FL_NAME 0x08
+
+/** File comment is present */
+#define GZIP_FL_COMMENT 0x10
+
+/** gzip extra header */
+struct gzip_extra_header {
+	/** Extra header length (excluding this field) */
+	uint16_t len;
+} __attribute__ (( packed ));
+
+/** gzip CRC header */
+struct gzip_crc_header {
+	/** CRC-16 */
+	uint16_t crc;
+} __attribute__ (( packed ));
+
+/** gzip footer */
+struct gzip_footer {
+	/** CRC-32 */
+	uint32_t crc;
+	/** Uncompressed size (modulo 2^32) */
+	uint32_t len;
+} __attribute__ (( packed ));
+
+extern struct image_type gzip_image_type __image_type ( PROBE_NORMAL );
+
+#endif /* _IPXE_GZIP_H */
diff --git a/src/tests/gzip_test.c b/src/tests/gzip_test.c
new file mode 100644
index 0000000..fa76edc
--- /dev/null
+++ b/src/tests/gzip_test.c
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2021 Michael Brown <mbrown@fensystems.co.uk>.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * You can also choose to distribute this program under the terms of
+ * the Unmodified Binary Distribution Licence (as given in the file
+ * COPYING.UBDL), provided that you have satisfied its requirements.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+/** @file
+ *
+ * gzip image tests
+ *
+ */
+
+/* Forcibly enable assertions */
+#undef NDEBUG
+
+#include <stdint.h>
+#include <ipxe/image.h>
+#include <ipxe/gzip.h>
+#include <ipxe/test.h>
+
+/** A gzip test */
+struct gzip_test {
+	/** Compressed filename */
+	const char *compressed_name;
+	/** Compressed data */
+	const void *compressed;
+	/** Length of compressed data */
+	size_t compressed_len;
+	/** Expected uncompressed name */
+	const char *expected_name;
+	/** Expected uncompressed data */
+	const void *expected;
+	/** Length of expected uncompressed data */
+	size_t expected_len;
+};
+
+/** Define inline data */
+#define DATA(...) { __VA_ARGS__ }
+
+/** Define a gzip test */
+#define GZIP( name, COMPRESSED, EXPECTED )				\
+	static const uint8_t name ## _compressed[] = COMPRESSED;	\
+	static const uint8_t name ## _expected[] = EXPECTED;		\
+	static struct gzip_test name = {				\
+		.compressed_name = #name ".gz",				\
+		.compressed = name ## _compressed,			\
+		.compressed_len = sizeof ( name ## _compressed ),	\
+		.expected_name = #name,					\
+		.expected = name ## _expected,				\
+		.expected_len = sizeof ( name ## _expected ),		\
+	};
+
+/** "Hello world" */
+GZIP ( hello_world,
+       DATA ( 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+	      0xf3, 0x48, 0xcd, 0xc9, 0xc9, 0x57, 0x28, 0xcf, 0x2f, 0xca,
+	      0x49, 0x01, 0x00, 0x52, 0x9e, 0xd6, 0x8b, 0x0b, 0x00, 0x00,
+	      0x00 ),
+       DATA ( 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c,
+	      0x64 ) );
+
+/** "Hello filename" */
+GZIP ( hello_filename,
+       DATA ( 0x1f, 0x8b, 0x08, 0x08, 0xeb, 0x5b, 0x96, 0x60, 0x00, 0x03,
+	      0x68, 0x77, 0x2e, 0x74, 0x78, 0x74, 0x00, 0xf3, 0x48, 0xcd,
+	      0xc9, 0xc9, 0x57, 0x48, 0xcb, 0xcc, 0x49, 0xcd, 0x4b, 0xcc,
+	      0x4d, 0x05, 0x00, 0x69, 0x37, 0x25, 0x3c, 0x0e, 0x00, 0x00,
+	      0x00 ),
+       DATA ( 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65,
+	      0x6e, 0x61, 0x6d, 0x65 ) );
+
+/** "Hello assorted headers" */
+GZIP ( hello_headers,
+       DATA ( 0x1f, 0x8b, 0x08, 0x1c, 0x11, 0x5c, 0x96, 0x60, 0x00, 0x03,
+	      0x05, 0x00, 0x41, 0x70, 0x01, 0x00, 0x0d, 0x68, 0x77, 0x2e,
+	      0x74, 0x78, 0x74, 0x00, 0x2f, 0x2f, 0x77, 0x68, 0x79, 0x3f,
+	      0x00, 0xf3, 0x48, 0xcd, 0xc9, 0xc9, 0x57, 0x48, 0x2c, 0x2e,
+	      0xce, 0x2f, 0x2a, 0x49, 0x4d, 0x51, 0xc8, 0x48, 0x4d, 0x4c,
+	      0x49, 0x2d, 0x2a, 0x06, 0x00, 0x59, 0xa4, 0x19, 0x61, 0x16,
+	      0x00, 0x00, 0x00 ),
+       DATA ( 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x61, 0x73, 0x73, 0x6f,
+	      0x72, 0x74, 0x65, 0x64, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65,
+	      0x72, 0x73 ) );
+
+/**
+ * Report gzip test result
+ *
+ * @v test		gzip test
+ * @v file		Test code file
+ * @v line		Test code line
+ */
+static void gzip_okx ( struct gzip_test *test, const char *file,
+		       unsigned int line ) {
+	struct image *image;
+	struct image *extracted;
+
+	/* Construct compressed image */
+	image = image_memory ( test->compressed_name,
+			       virt_to_user ( test->compressed ),
+			       test->compressed_len );
+	okx ( image != NULL, file, line );
+	okx ( image->len == test->compressed_len, file, line );
+
+	/* Check type detection */
+	okx ( image->type == &gzip_image_type, file, line );
+
+	/* Extract archive image */
+	okx ( image_extract ( image, NULL, &extracted ) == 0, file, line );
+
+	/* Verify extracted image content */
+	okx ( extracted->len == test->expected_len, file, line );
+	okx ( memcmp_user ( extracted->data, 0,
+			    virt_to_user ( test->expected ), 0,
+			    test->expected_len ) == 0, file, line );
+
+	/* Verify extracted image name */
+	okx ( strcmp ( extracted->name, test->expected_name ) == 0,
+	      file, line );
+
+	/* Unregister images */
+	unregister_image ( extracted );
+	unregister_image ( image );
+}
+#define gzip_ok( test ) gzip_okx ( test, __FILE__, __LINE__ )
+
+/**
+ * Perform gzip self-test
+ *
+ */
+static void gzip_test_exec ( void ) {
+
+	gzip_ok ( &hello_world );
+	gzip_ok ( &hello_filename );
+	gzip_ok ( &hello_headers );
+}
+
+/** gzip self-test */
+struct self_test gzip_test __self_test = {
+	.name = "gzip",
+	.exec = gzip_test_exec,
+};
diff --git a/src/tests/tests.c b/src/tests/tests.c
index f4cf041..1cc4c81 100644
--- a/src/tests/tests.c
+++ b/src/tests/tests.c
@@ -74,3 +74,4 @@
 REQUIRE_OBJECT ( pem_test );
 REQUIRE_OBJECT ( ntlm_test );
 REQUIRE_OBJECT ( zlib_test );
+REQUIRE_OBJECT ( gzip_test );
