#include "decompressor.h" #include "stb.h" void decompress(const char *filepath, const char *savepath) { Decompressor dec; dec.reader.buffer.load_from_file(filepath); int width, hight; std::vector ret = dec.decompress(width, hight); stb_w(savepath, hight, width, 1, ret.data()); } int main(int argc, char **argv) { if (argc != 2) { printf("Usage: %s \n", argv[0]); return 1; } decompress(argv[1], "out.bmp"); return 0; }