This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Extract .cpio file from a pbzx Payload file. | |
# | |
# Based on https://gist.github.com/pudquick/ac29c8c19432f2d200d4, | |
# this version adds a command-line interface, improves efficiency (1 MiB chunks | |
# instead of a full copy in memory), adds Python 3 compatibility and | |
# automatically decompresses stuff (some blocks may not be compressed). | |
# | |
# Example usage (from Python): | |
# |