ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
UnzipFiles.hpp
Go to the documentation of this file.
1#pragma once
2/*
3* UnzipFiles.hpp
4*
5* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6* Copyright (c) 2021, 2025 Shelby Merrick
7* http://www.forkineye.com
8*
9* This program is provided free for you to use in any way that you wish,
10* subject to the laws and regulations where you are using it. Due diligence
11* is strongly suggested before using this code. Please give credit where due.
12*
13* The Author makes no warranty of any kind, express or implied, with regard
14* to this program or the documentation contained in this document. The
15* Author shall not be liable in any event for incidental or consequential
16* damages in connection with, or arising out of, the furnishing, performance
17* or use of these programs.
18*
19*/
20#ifdef SUPPORT_UNZIP
21
22#include "ESPixelStick.h"
23#include <unzipLIB.h>
24#include <TimeLib.h>
25
26class UnzipFiles
27{
28public:
29 UnzipFiles ();
30 virtual ~UnzipFiles ();
31
32 void Run();
33
34 void * OpenZipFile(const char *filename, int32_t *size);
35 void CloseZipFile(void *p);
36 int32_t ReadZipFile(void *p, uint8_t *buffer, int32_t length);
37 int32_t SeekZipFile(void *p, int32_t position, int iType);
38 void GetDriverName(String & value) {value = "Unzip";}
39 void ProcessZipFile(String & FileName);
40 void ProcessCurrentFileInZip(unz_file_info & fi, String & Name);
41
42private:
43 UNZIP zip; // statically allocate the UNZIP structure (41K)
44 uint8_t *pOutputBuffer = nullptr;
45 uint32_t BufferSize = 0;
46 int32_t SeekPosition = 0;
47 void DosDateToTmuDate (uint32_t DosDate, tmElements_t * ptm);
48
49protected:
50
51}; // UnzipFiles
52
53extern UnzipFiles gUnzipFiles;
54
55#endif // def SUPPORT_UNZIP
uint32_t size
Definition EFUpdate.h:1
char filename[250]
Definition fseq.h:7
void GetDriverName(String &Name)
Definition main.cpp:120