mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Have ractool decode in parallel
The "middle of the decompressed file" numbers changed because the programs were re-run on a desktop, not a laptop.
This commit is contained in:
1 parent
ca4a6c8846
commit
22c030b2e0
3 files changed
+241
-45
No files matched your search
+15
-2
@@ -37,8 +37,21 @@ func bitwiseSubset(outer Codec, inner Codec) bool {
|
||||
// greater than high.
|
||||
type Range [2]int64
|
||||
|
||||
func (r *Range) Empty() bool { return r[0] == r[1] }
|
||||
func (r *Range) Size() int64 { return r[1] - r[0] }
|
||||
func (r Range) Empty() bool { return r[0] == r[1] }
|
||||
func (r Range) Size() int64 { return r[1] - r[0] }
|
||||
|
||||
func (r Range) Intersect(s Range) Range {
|
||||
if r[0] < s[0] {
|
||||
r[0] = s[0]
|
||||
}
|
||||
if r[1] > s[1] {
|
||||
r[1] = s[1]
|
||||
}
|
||||
if r[0] > r[1] {
|
||||
return Range{}
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
// Chunk is a compressed chunk returned by a ChunkReader.
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user