# gopacker **Repository Path**: guapian/gopacker ## Basic Information - **Project Name**: gopacker - **Description**: https://github.com/nirhaas/gopacker - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-02 - **Last Updated**: 2025-01-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gopacker A UPX-like packer to shrink executables. ## Quick Start ``` go get github.com/nirhaas/gopacker gopacker ``` ## How does it work ### Packing * Copy `gopacker` executable itself to output file. * Compress and stream (append) to output file. * Append compressed size. * Append magic string. Output file is now a functional executable. ### Unpacking When running the packed executable: * Checks the last few bytes to see if magic string is there. * Reading compressed size. * Reading compressed data. * Uncompressing to memory. * Overriding the packed executable. * syscall exec to run the unpacked executable. Possible TODO: * Better compression. * Encryption.