Closed
Bug 848770
Opened 12 years ago
Closed 12 years ago
Choose the best compression settings automagically for seekable zstreams (szip)
Categories
(Core :: mozglue, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(2 files)
16.01 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
3.55 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #723419 -
Flags: review?(nfroyd)
Comment 2•12 years ago
|
||
Comment on attachment 723419 [details] [diff] [review]
Choose the best compression settings automagically for seekable zstreams (szip)
Review of attachment 723419 [details] [diff] [review]:
-----------------------------------------------------------------
Looks sane too me.
::: mozglue/linker/szip.cpp
@@ +274,5 @@
> + if (do_compress(*origData, tmpBuf, NULL, 0, f) == 0) {
> + if (tmpBuf.GetLength() < outBuf.GetLength()) {
> + outBuf.Resize(tmpBuf.GetLength());
> + memcpy(static_cast<void *>(outBuf), static_cast<void *>(tmpBuf),
> + tmpBuf.GetLength());
Factoring out this .Resize/memcpy idiom (a method in Buffer?) would be a good thing. You could use it in FilteredBuffer and several places in this function. (Maybe other places in this file, I didn't check.)
Attachment #723419 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #723860 -
Flags: review?(nfroyd)
Updated•12 years ago
|
Attachment #723860 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Landed in one piece.
https://hg.mozilla.org/integration/mozilla-inbound/rev/80944f366642
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•