Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
bbe4b69c
Commit
bbe4b69c
authored
Mar 08, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix LZ4FEncoder constructor
parent
7f08c069
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
compress.cpp
native/jni/magiskboot/compress.cpp
+5
-9
No files found.
native/jni/magiskboot/compress.cpp
View file @
bbe4b69c
...
@@ -366,7 +366,7 @@ void LZ4FDecoder::read_header(const uint8_t *&in, size_t &size) {
...
@@ -366,7 +366,7 @@ void LZ4FDecoder::read_header(const uint8_t *&in, size_t &size) {
size
-=
read
;
size
-=
read
;
}
}
LZ4FEncoder
::
LZ4FEncoder
()
:
outbuf
(
nullptr
),
outCapacity
(
0
)
{
LZ4FEncoder
::
LZ4FEncoder
()
:
outbuf
(
nullptr
),
outCapacity
(
0
)
,
total
(
0
)
{
LZ4F_createCompressionContext
(
&
ctx
,
LZ4F_VERSION
);
LZ4F_createCompressionContext
(
&
ctx
,
LZ4F_VERSION
);
}
}
...
@@ -422,10 +422,8 @@ void LZ4FEncoder::write_header() {
...
@@ -422,10 +422,8 @@ void LZ4FEncoder::write_header() {
FilterOutStream
::
write
(
outbuf
,
write
);
FilterOutStream
::
write
(
outbuf
,
write
);
}
}
LZ4Decoder
::
LZ4Decoder
()
:
init
(
false
),
buf_off
(
0
),
total
(
0
),
block_sz
(
0
)
{
LZ4Decoder
::
LZ4Decoder
()
:
init
(
false
),
buf_off
(
0
),
total
(
0
),
block_sz
(
0
),
outbuf
=
new
char
[
LZ4_UNCOMPRESSED
];
outbuf
(
new
char
[
LZ4_UNCOMPRESSED
]),
buf
(
new
char
[
LZ4_COMPRESSED
])
{}
buf
=
new
char
[
LZ4_COMPRESSED
];
}
LZ4Decoder
::~
LZ4Decoder
()
{
LZ4Decoder
::~
LZ4Decoder
()
{
delete
[]
outbuf
;
delete
[]
outbuf
;
...
@@ -478,10 +476,8 @@ uint64_t LZ4Decoder::finalize() {
...
@@ -478,10 +476,8 @@ uint64_t LZ4Decoder::finalize() {
return
total
;
return
total
;
}
}
LZ4Encoder
::
LZ4Encoder
()
:
init
(
false
),
buf_off
(
0
),
out_total
(
0
),
in_total
(
0
)
{
LZ4Encoder
::
LZ4Encoder
()
:
init
(
false
),
buf_off
(
0
),
out_total
(
0
),
in_total
(
0
),
outbuf
=
new
char
[
LZ4_COMPRESSED
];
outbuf
(
new
char
[
LZ4_COMPRESSED
]),
buf
(
new
char
[
LZ4_UNCOMPRESSED
])
{}
buf
=
new
char
[
LZ4_UNCOMPRESSED
];
}
LZ4Encoder
::~
LZ4Encoder
()
{
LZ4Encoder
::~
LZ4Encoder
()
{
delete
[]
outbuf
;
delete
[]
outbuf
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment