Skip to content

Commit 8c2dd59

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 33f101f + 390a67e commit 8c2dd59

27 files changed

+1122
-33
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# FileFormat.Drako
1+
# Openize.Drako
22

33

4-
FileFormat.Drako was ported from [Google Draco](https://github.com/google/draco).
4+
Openize.Drako was ported from [Google Draco](https://github.com/google/draco).
55

66

77
### 1. Installation
88

99
Add the following code in your pom.xml:
1010
```
1111
<dependency>
12-
<groupId>dev.fileformat</groupId>
12+
<groupId>com.openize</groupId>
1313
<artifactId>drako</artifactId>
14-
<version>1.4.2</version>
14+
<version>1.4.4</version>
1515
</dependency>
1616
```
1717

@@ -78,14 +78,14 @@ Files.writeString(Paths.get("output.obj"), sb.toString());
7878

7979

8080
## License
81-
FileFormat.Drako is available under [Openize License](LICENSE).
81+
Openize.Drako is available under [Openize License](LICENSE).
8282
> [!CAUTION]
83-
> FileFormat does not and cannot grant You a patent license for the utilization of [Google Draco](https://github.com/google/draco) compression/decompression technologies.
83+
> Openize does not and cannot grant You a patent license for the utilization of [Google Draco](https://github.com/google/draco) compression/decompression technologies.
8484
8585
## OSS Notice
8686
Sample files used for tests and located in the "TestsData" folder belong to [Google Draco](https://github.com/google/draco) and are used according to [Apache License 2.0](https://github.com/google/draco/blob/main/LICENSE)
8787

8888

8989
## Coming updates
90-
FileFormat.Drako will receive new features and regular updates to stay in sync with the latest versions of [Google Draco](https://github.com/google/draco). We appreciate your patience as we work on these improvements. Stay tuned for more updates soon.
90+
Openize.Drako will receive new features and regular updates to stay in sync with the latest versions of [Google Draco](https://github.com/google/draco). We appreciate your patience as we work on these improvements. Stay tuned for more updates soon.
9191

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package com.openize.drako;
2+
import com.openize.drako.HashBuilder;
3+
import com.openize.drako.Struct;
4+
import java.io.Serializable;
5+
/**
6+
* Struct for holding error information about prediction.
7+
*
8+
*/
9+
final class Error implements Struct<Error>, Serializable
10+
{
11+
public long residual_error;
12+
public long num_bits;
13+
public static boolean op_lt(Error a, Error b)
14+
{
15+
if (a.num_bits != b.num_bits)
16+
return a.num_bits < b.num_bits;
17+
return a.residual_error < b.residual_error;
18+
}
19+
20+
public static boolean op_gt(Error a, Error b)
21+
{
22+
if (a.num_bits != b.num_bits)
23+
return a.num_bits > b.num_bits;
24+
return a.residual_error > b.residual_error;
25+
}
26+
27+
public Error()
28+
{
29+
}
30+
31+
private Error(Error other)
32+
{
33+
this.residual_error = other.residual_error;
34+
this.num_bits = other.num_bits;
35+
}
36+
37+
@Override
38+
public Error clone()
39+
{
40+
return new Error(this);
41+
}
42+
43+
@Override
44+
public void copyFrom(Error src)
45+
{
46+
if (src == null)
47+
return;
48+
this.residual_error = src.residual_error;
49+
this.num_bits = src.num_bits;
50+
}
51+
52+
static final long serialVersionUID = 2253L;
53+
@Override
54+
public int hashCode()
55+
{
56+
HashBuilder builder = new HashBuilder();
57+
builder.hash(this.residual_error);
58+
builder.hash(this.num_bits);
59+
return builder.hashCode();
60+
}
61+
62+
@Override
63+
public boolean equals(Object obj)
64+
{
65+
if (!(obj instanceof Error))
66+
return false;
67+
Error rhs = (Error)obj;
68+
if (this.residual_error != rhs.residual_error)
69+
return false;
70+
if (this.num_bits != rhs.num_bits)
71+
return false;
72+
return true;
73+
}
74+
75+
}

src/compression/com/openize/drako/HoleEventData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void copyFrom(HoleEventData src)
3939
this.symbolId = src.symbolId;
4040
}
4141

42-
static final long serialVersionUID = 775306507L;
42+
static final long serialVersionUID = -2127840847L;
4343
@Override
4444
public int hashCode()
4545
{

0 commit comments

Comments
 (0)