Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
f9991288
Commit
f9991288
authored
Oct 25, 2016
by
Etienne Renault
Browse files
compression: fix bad encoding
Fixes
#190
. * NEWS, spot/misc/intvcomp.cc: here.
parent
ce63c30c
Changes
2
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
f9991288
...
...
@@ -25,6 +25,9 @@ New in spot 2.1.2.dev (not yet released)
genltl --go-theta=12 | ltl2tgba --low --any
is instantaneous as it should be.
* Compression could encode '6' and '22' in the same way. This issue
only appears when using the compression from intvcomp.hh.
New in spot 2.1.2 (2016-10-14)
Command-line tools:
...
...
spot/misc/intvcomp.cc
View file @
f9991288
...
...
@@ -22,6 +22,7 @@
#include
<cstddef>
#include
<cassert>
#include
<spot/misc/intvcomp.hh>
#include
<iostream>
namespace
spot
{
...
...
@@ -38,7 +39,7 @@ namespace spot
// 00 encodes "value 0"
// 010 encodes "value 1"
// 011 encodes "a value in [2..5]" followed by 2 bits
// 100 encodes "a value in [6..2
2
]" followed by 4 bits
// 100 encodes "a value in [6..2
1
]" followed by 4 bits
// 101 encodes "repeat prev. value [1..8] times" followed by 3 bits count
// 110 encodes "repeat prev. value [9..40] times" followed by 5 bits count
// 111 encodes "an int value" followed by 32 bits
...
...
@@ -74,14 +75,14 @@ namespace spot
self
().
push_bits
(
0x3
,
3
,
0x7
);
self
().
push_bits
(
val
-
2
,
2
,
0x3
);
}
else
if
(
val
>=
6
&&
val
<=
2
2
)
else
if
(
val
>=
6
&&
val
<=
2
1
)
{
self
().
push_bits
(
0x4
,
3
,
0x7
);
self
().
push_bits
(
val
-
6
,
4
,
0xf
);
}
else
{
assert
(
val
>
2
2
);
assert
(
val
>
2
1
);
self
().
push_bits
(
0x7
,
3
,
0x7
);
self
().
push_bits
(
val
,
32
,
-
1U
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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