Closed
Bug 334768
Opened 18 years ago
Closed 18 years ago
bzip2 compression is broken
Categories
(Toolkit Graveyard :: Data Collection/Metrics, defect)
Toolkit Graveyard
Data Collection/Metrics
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
Details
Attachments
(1 file, 1 obsolete file)
1.93 KB,
patch
|
Details | Diff | Splinter Review |
CompressBZ2() is failing due to not running BZ_FINISH. As it turns out, we can avoid using this whole stream API and just fopen the file ourselves, without introducing a CRT incompatibility.
Assignee | ||
Comment 1•18 years ago
|
||
I cleaned up the GetDataFile() methods while I was at it (this change makes us no longer require a nsILocalFile for the compression output).
Attachment #219094 -
Flags: first-review?(darin)
Comment 2•18 years ago
|
||
Comment on attachment 219094 [details] [diff] [review] patch Oh, I remember now why I didn't do this :-( You should use GetPath + _wfopen on Windows to avoid Unicode path problems. But that is not supported on Win9x, so you'd need to failover to calling GetNativePath + fopen on Win9x. xpcom/io/nsWinAPIs.h defines mFOpen which implements the failover for you. You can't link to that though.
Comment 3•18 years ago
|
||
Another choice is to use OpenNSPRFileDesc + PR_FileDesc2NativeHandle + _open_osfhandle + _fdopen :-)
Assignee | ||
Comment 4•18 years ago
|
||
Fix the current libbz2 stream usage. We need to loop on BZ_FINISH until BZ_STREAM_END is returned.
Attachment #219094 -
Attachment is obsolete: true
Attachment #219111 -
Flags: first-review?(darin)
Attachment #219094 -
Flags: first-review?(darin)
Comment 5•18 years ago
|
||
Comment on attachment 219111 [details] [diff] [review] patch r=darin
Attachment #219111 -
Flags: first-review?(darin) → first-review+
Assignee | ||
Comment 6•18 years ago
|
||
checked in, branch and trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•