mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 13:17:39 +02:00
Add decompression command
This commit is contained in:
@ -64,14 +64,20 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void release(void *&b, T &len) {
|
||||
template <typename bytes, typename length>
|
||||
void release(bytes *&b, length &len) {
|
||||
b = buf;
|
||||
len = off;
|
||||
buf = nullptr;
|
||||
off = cap = 0;
|
||||
}
|
||||
|
||||
template <typename bytes, typename length>
|
||||
void getbuf(bytes *&b, length &len) const {
|
||||
b = buf;
|
||||
len = off;
|
||||
}
|
||||
|
||||
~BufOutStream() override {
|
||||
free(buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user