Lossless Compression of Hexahedral Meshes
ABSTRACT Many science and engineering applications use highresolution unstructured hexahedral meshes to model solid 3D shapes for finite element simulations. These simulations frequently dump the mesh and associated fields to disk for subsequent analysis, which involves the transfer of huge volumes of data. To reduce requirements on disk space and bandwidth, we propose efficient schemes for lossless online compression of hexahedral mesh geometry and connectivity. Our approach is to use hashbased value predictors to transform the mesh connectivity list into a more compact bytealigned stream of symbols that can then be efficiently compressed using conventional text compressors such as gzip. Our scheme is memory efficient, fast, and simple to implement, and yields 13 orders of magnitude reduction on a set of benchmark meshes. For geometry and field coding, we derive a set of local spectral predictors optimized for each possible configuration of previously encoded and thus available vertices within a hexahedron. Combined with lossless floatingpoint residual coding, this approach improves considerably upon prior predictive geometry coding schemes.
 [Show abstract] [Hide abstract]
ABSTRACT: We describe a method for streaming compression of hexahedral meshes. Given an interleaved stream of vertices and hexahedra our coder incrementally compresses the mesh in the presented order. Our coder is extremely memory efficient when the input stream also documents when vertices are referenced for the last time (i.e. when it contains topological finalization tags). Our coder then continuously releases and reuses data structures that no longer contribute to compressing the remainder of the stream. This means in practice that our coder has only a small fraction of the whole mesh in memory at any time. We can therefore compress very large meshes—even meshes that do not fit in memory. Compared to traditional, nonstreaming approaches that load the entire mesh and globally reorder it during compression, our algorithm trades a less compact compressed representation for significant gains in speed, memory, and I/O efficiency. For example, on the 456k hexahedra “blade” mesh, our coder is twice as fast and uses 88 times less memory (only 3.1 MB) with the compressed file increasing about 3% in size. We also present the first scheme for predictive compression of properties associated with hexahedral cells.The Visual Computer 01/2010; 26:11131122. · 0.91 Impact Factor  [Show abstract] [Hide abstract]
ABSTRACT: This project investigated layout and compression techniques for large, unstructured simulation data to reduce bandwidth requirements and latency in simulation I/O and subsequent postprocessing, e.g. data analysis and visualization. The main goal was to eliminate the datatransfer bottleneck  for example, from disk to memory and from central processing unit to graphics processing unit  through coherent data access and by trading underutilized compute power for effective bandwidth and storage. This was accomplished by (1) designing algorithms that both enforce and exploit compactness and locality in unstructured data, and (2) adapting offline computations to a novel stream processing framework that supports pipelining and lowlatency sequential access to compressed data. This report summarizes the techniques developed and results achieved, and includes references to publications that elaborate on the technical details of these methods.  [Show abstract] [Hide abstract]
ABSTRACT: In this article, we present an efficient connectivity compression algorithm for triangular meshes. It is a facebased, single resolution and lossless connectivity compression method. This method is an improvement on Edgebreaker. In the aspect of mesh traversing, we use adaptive mesh traversing method to make Split operations as few as possible, which are burdens of the compression ratio. In the aspect of Entropy encoding, a variable codemode is well designed for every operator in the operator series, which is the result of mesh traversing. Then a binary strand can be obtained. And finally this binary strand is encoded by using adaptive arithmetic coding method. The compression ratio of our algorithm is obtained when all the operators in the series are encoded. In comparison to the previous best facebased encoding methods, our method can significantly improve the compression ratio.01/2010;
Page 1
Lossless Compression of Hexahedral Meshes
Peter Lindstrom
pl@llnl.gov
Martin Isenburg
isenburg@llnl.gov
Lawrence Livermore National Laboratory∗
Abstract
Many science and engineering applications use highresolution unstructured hexahedral
meshes to model solid 3D shapes for finite element simulations. These simulations frequently
dump the mesh and associated fields to disk for subsequent analysis, which involves the
transfer of huge volumes of data. To reduce requirements on disk space and bandwidth,
we propose efficient schemes for lossless online compression of hexahedral mesh geometry
and connectivity.Our approach is to use hashbased value predictors to transform the
mesh connectivity list into a more compact bytealigned stream of symbols that can then
be efficiently compressed using conventional text compressors such as gzip. Our scheme
is memory efficient, fast, and simple to implement, and yields 1–3 orders of magnitude
reduction on a set of benchmark meshes. For geometry and field coding, we derive a set of
local spectral predictors optimized for each possible configuration of previously encoded and
thus available vertices within a hexahedron. Combined with lossless floatingpoint residual
coding, this approach improves considerably upon prior predictive geometry coding schemes.
1. Introduction
Numerical simulation is an integral component of many science and engineering disci
plines, with applications ranging from computational fluid dynamics to structural mechan
ics. Usually such simulations involve discretizing a continuous function onto a mesh. For
reasons of accuracy and flexibility, unstructured hexahedral meshes are the preferred rep
resentation [1], which has spawned a tremendous amount of research effort over the past
decade on developing automated hexahedral meshing methods [2] for discretizing complex
geometry with wellshaped elements.
In massively parallel simulations, it is common to write both the mesh and the fields
attached to it to disk periodically, e.g. once every time step, regardless of whether the mesh
connectivity and geometry change over time. The mesh is most often represented as an
array of 3D vertex (aka. node) positions (the geometry) and a separate array of indices (the
connectivity) into the vertex array to represent the hexahedral elements (aka. cells or zones),
with eight indices per hexahedron. Assuming equal numbers of vertices and hexahedra,
64bit double precision for the geometry, and 32bit integer indices for connectivity, this
representation equates to 56 bytes per hexahedron for the function domain alone.
meshes may range up to millions of hexahedra, writing just the mesh to disk once may
require gigabytes of space.
As
∗Work performed under the auspices of the U.S. DoE by LLNL under Contract DEAC5207NA27344.
Page 2
Data compression techniques specialized for meshes [3] offer a means to alleviate the I/O
demands of large simulations. Such methods usually build a separate mesh data structure
that is traversed from element to adjacent element in some deterministic order. Only a
handful of symbols are needed to specify how each element is attached to the previously
encoded partial mesh. The mesh geometry is often aggressively quantized to a dozen or so
bits per coordinate to allow simple residual coding via a small set of linear predictors.
Unfortunately many of these prior techniques are not applicable to compression of simu
lation data. First, both memory and CPU time are extremely scarce resources in numerical
simulation, and the time and memory needed to first construct a mesh data structure are
often not available. For example, the methods proposed in [4,5] require memory on the
order of several hundreds to over a thousand bytes per hexahedron. Second, for check
pointing purposes and accurate analysis, the compression scheme must be lossless [6,7].
Not only does this requirement rule out quantization, but it also implies that the geometry
and connectivity arrays may not be reordered so that the simulation state can be per
fectly recovered, e.g. for debugging purposes, to avoid numerical drift due to outoforder
floatingpoint operations, and to keep external references to the mesh valid. Even the “ori
entation” of each hexahedron, i.e. the order in which its eight vertex indices are listed, must
remain intact. Until recently [8,9] mesh compressors have relied on reordering to maximize
data reduction by avoiding explicit coding of the permutations of elements. (Note that
reordering for compression purposes may be acceptable as a onetime preprocess before the
simulation is run.) Finally, the compression scheme must be online. Shortage of time and
disk space eliminates the possibility to make one or more analysis passes over the mesh, or
to first dump it uncompressed to disk. An online scheme integrates easily with applications
by accepting and coding each vertex and element as they are output. From a pragmatic
standpoint, such transparent and lossless compression is crucial for widespread adoption.
Faced with these requirements, we here present a simple yet effective lossless compression
scheme for hexahedral meshes. We exploit the regularity in the combinatorial structure of
the mesh, as well as the nearly invariably coherent orderings of vertices and elements pro
duced by mesh generators. Rather than encoding how to attach elements to the advancing
front between visited and notyetvisited elements, we directly compress the integervalued
mesh connectivity list via hashbased value prediction [10]. Furthermore, instead of adopt
ing sophisticated context modeling and source coding techniques, we similarly to [11,12]
rely on a general purpose text compressor such as gzip and focus on transforming the
input into a bytealigned stream of easytocompress symbols. Our method has a fixed
(but configurable) memory footprint, runs in linear time, and is easily integrated with most
applications with minimal code changes. Though our technique is generally less effective
than state of the art, it is considerably faster and much more memory efficient and simple to
implement. Moreover, our method trivially handles nonmanifold and degenerate elements
and preserves the ordering of both vertices and elements. Hence it is completely lossless.
2. Connectivity compression
Hexahedral meshes usually exhibit a large amount of regularity in both geometry and
connectivity that can be exploited by a compressor. Unfortunately this regularity does not
emerge directly in the connectivity list. For example, running gzip on the raw list of 32bit
indices usually results in poor compression, in part because the indices are wider than the
bytelevel granularity on which gzip operates, but more importantly because each index
Page 3
occurs at most a few times, preventing recurring patterns to form. Hence a transform that
can expose the regularity to such a compressor is needed.
Contrary to tetrahedral elements, hexahedral elements tile space uniformly, and the dual
of a uniform hexahedral grid is also hexahedral. These properties imply that, aside from
the “curving” of space needed to mesh the boundary, the interior can predominantly be
tiled with a combinatorially (and even geometrically) regular grid, in which each vertex
has eight incident elements. As a consequence, most hexahedral meshes have roughly equal
numbers of vertices and hexahedra.
Hexahedral meshes are with few exceptions generated by automated methods that tile
the interior of a prescribed quadrilateral mesh boundary [2]. Such mesh generators tend to
order elements by tracing out strands or sheets of hexahedra such that consecutive elements
share a face. Because vertex and element generation usually occur in tandem, and since on
average each interior hexahedral element is paired with one vertex, there is often substantial
correlation between vertex and element index. Finally, in this mesh growing process, it is
natural to orient consecutive adjacent elements consistently, i.e. so that adjacent elements
agree which of the eight vertices within each element is, e.g., the “bottomleftfar” one.1
The benchmark meshes in Figure 1 have a largely consistent orientation, as is indicated by
large uniformly colored regions of faces. Here all first faces (e.g. formed by the first four
vertices) within the hexahedra are assigned the same color, and so on.
For systematically and consistently ordered meshes, it is possible to separate the H × 8
index array of H hexahedra into eight linear streams of H indices each (see Table 1), and to
compress them largely independently. This strategy, which is a significant departure from
previous work on hexahedral mesh compression [4,5], is the one we take in this paper. Our
main approach is to use the last few indices as context for a value predictor, to employ
bytealigned variablelength residual coding when there is a misprediction, and to compress
the resulting byte stream using a general purpose byte stream compressor such as gzip or
bzip2. Because we do not reconstruct the mesh from the index list, we are not burdened
with the difficulties of maintaining a mesh data structure, or handling nonmanifold or
degenerate elements (e.g. with one face collapsed to an edge, forming a wedge element),
but simply losslessly compress the integer index array. In the subsections below, we describe
each of the components of our compressor.
2.1. DFCM index prediction
Table 1 shows a piece of an index list for a regular grid. Our goal is to encode this
list row by row, from left to right. Each row holds the vertices of an element that span
the three spatial dimensions. Though the example in Table 1 is overly simplistic, the runs
of constant strides vj
meshes. This suggests as index predictor the linear extrapolation pj
more general stridebased approach is the differential finite context method (DFCM) [13],
which has been used successfully for trace file and floatingpoint compression [7,12]. The
basic DFCM predictor is a hash table that maps a set of recent strides to the current,
predicted stride. No collision resolution is employed; insertions overwrite past hash entries.
DFCM accounts for nonlinearities and variations in strides by learning recurring—though
not necessarily constant—stride patterns.
i− vj
i−1in each column j are prevalent also in many unstructured
i= 2vj
i−1− vj
i−2. A
1The 24 possible orientations of a hexahedron are determined by which face and vertex are specified first.
Note that a globally consistent orientation is not possible unless the mesh connectivity is entirely regular.
Page 4
v0
i
1
2
3
4
5
6
7
8
9
v1
i
2
3
4
5
6
7
8
9
v2
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
33
34
i
v3
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
34
35
i
v4
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
273
274
i
v5
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
274
275
i
v6
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
289
290
i
v7
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
290
291
i
10
11
12
13
14
15
16
18
19
10
11
12
13
14
15
17
18
Table 1.
‘grid16’ connectivity list.
The first 17 lines of the
unsigned
dfcm(const unsigned* v, unsigned i)
{
unsigned a = v[i  8]  v[i  16];
unsigned b = v[i  1]  v[i 
unsigned h = ((b << 6) + a) & 0xfff; // hash index
unsigned p = hash[h] + v[i  8] + a; // prediction
if (p == v[i])
conf[h] = true;
else {
if (conf[h])
conf[h] = false;
else
hash[h] += v[i]  p;
}
return p;
}
// predict vertex v[i]
// corresponding vertex stride
// previous vertex stride9];
// is prediction correct?
// if so, set confidence bit
// is confidence bit set?
// if so, clear confidence bit
// otherwise update hash
// return prediction
Listing 1. DFCM value predictor.
The free parameters in a DFCM predictor are the hash function and table size used,
and the decision what to store in the table. We found hash tables as small as 212= 4,096
entries to work sufficiently well. In choosing a hash function, we note that when a prediction
fails, often the other indices within the same element are also be mispredicted, as happens
for example after the element traversal hits a dead end at a boundary. We therefore use
as context not only the previous stride in the same column of the index list, but also
incorporate in the hash function the most recent stride from the previous column, thereby
involving another index from the same element. Variations in this secondary stride diverts
the hash lookup to different parts of the hash table to avoid collisions.
Listing 1 shows the actual hash function used, with the argument v holding the linearized
index list in rowmajor order. Note that only (some of) the last 16 indices from the index
list are used as context and need to be buffered. To shorten the warmup time of the
zeroinitialized hash table, we store in it not the predicted stride, as in the original DFCM
method, but rather the difference in strides, anticipating constant strides (as opposed to
rarely occurring zerostrides). (This approach is equivalent to initializing the dthentry
with d in standard DFCM, but only for strides d smaller than the hash size.) This way we
correctly predict all constant stride sequences without first having to learn them. One may
thus view our hash entries as learned correctors to the linear extrapolation pj
In our basic scheme, we use one DFCM hash table per column to predict the eight vertex
indices of a hexahedron. In a single byte we encode using one bit per vertex whether
the corresponding index was correctly predicted. Any mispredicted indices are appended
verbatim. Assuming 32bit integer indices, this scheme yields a maximum compression of
32:1. We outline below several modifications and improvements to this basic scheme.
i.
2.2. Confidence bit
As pointed out in [13], in constantstride subsequences such as nested loops the single
difference in stride due to loop restart usually causes two mispredictions: once when the
counter first wraps, and once when the constant stride reemerges since it has then been
replaced by the wraparound stride in the hash table. Similar wraparounds frequently occur
in hexahedral meshes, e.g. when reaching the mesh boundary or a previously generated
element. To guard against such double whammies, we add a singlebit confidence counter
to each hash entry that reflects whether the associated prediction was last successful. Fol
lowing a misprediction the hash entry is updated only if the confidence bit is not set. This
technique improved compression of all of our benchmark meshes, and on average by 17%.
Page 5
2.3. Variablelength byte coding
An obvious modification to the scheme is to use variablelength residual coding for small
or frequent residuals (i.e. differences between actual and predicted indices). As is common,
we remap the signed residuals to ordinals by magnitude: (0,−1,+1,−2,+2,...). We then
encode these ordinals using a variable number of bytes.
Several bytealigned coding schemes have been proposed, including fixedtovariable
codes such as radix256 Huffman and variabletofixed codes such as Anh and Moffat’s
carryover12 scheme [14]. Perhaps the simplest fixedtovariable code is the static byte code
(see, e.g., [14]), in which an integer is broken down into seven value bits followed by a
continuation bit that signals whether more value bits are needed to represent the integer.
Though potentially far from optimal, we chose this code because it is simple and fast to
construct, and it preserves the bit pattern in frequent (perhaps large) residuals that can be
exploited by a subsequent zlib coding phase. Compared to using raw fixedlength indices,
this modification resulted in a 72% improvement in compression on average.
2.4. Reprediction
Failed DFCM predictions are often poorly correlated with the actual indices, for two
reasons. First, when the failure is due to a hash collision, the predicted and actual values
may be arbitrarily far apart. Second, even if such residuals are not large, they tend not to
exhibit any particular regularity, and therefore do not compress well. Therefore we propose
using an alternative predictor to compute residuals when the DFCM predictor fails.
Because vertex indices are often regular and localized with respect to the sequence of
hexahedra, we would expect that the index of a neighboring vertex would serve as a fair
(though rarely perfect) predictor. Since we maintain only two hexahedra as context with
no additional adjacency information, we limit the candidate neighbors to those either in
the same or previous hexahedron as the current vertex vj
of vj
an edge) in the same hexahedron that have already been encoded, and the corresponding
jthvertex vj
To choose which neighbor to use as prediction, we apply this same neighbor predictor
to the eight most recently encoded vertex indices and compute residuals. We then use as
prediction for the current vertex the neighbor in the direction of smallest mean absolute
residual. This heuristic produces not only small residuals on average, but also regular ones
whenever strides between adjacent vertices are regular, as is often the case. This scheme
furthermore worked consistently and considerably better than simpler approaches, such as
using a fixed, dataindependent priority of directions, and always improved compression
over computing residuals from the DFCM prediction, on average by 14%.
i. Depending on the local index j
ibetween one and four neighbors are available: those adjacent vertices (i.e. joined by
i−1in the previous hexahedron.
2.5. General purpose compression
So far we have described the transform phase only, which alone yields 16:1 compression
on average. Dramatic improvement in compression is obtained by passing this compact byte
stream through a bytebased compressor. For simplicity and speed, we chose the widely
available zlib 1.2.3 compressor on which gzip is based. We used the default zlib settings
with 24 KB input and 8 KB output buffers. This improved the median compression from
16:1 to 84:1, and ratios as high as 3,800:1 were observed for nearregular meshes.
Page 6
blockbump2c1cylinderfru grid16hanger
hutchhydra mdg1bshaft steventestucd3d
Figure 1. Meshes used in our experiments. The face colors indicate element orientation.
mesh
VHVcorr
Hcorr
without zlib
bytes
97,890
5,871
105,613
1,214,434
6,903
3,649
1,315
23,583
237,256
9,721
29,908
112,829
12,621
2,449
with zlib
bytes
790
3,642
13,394
181,713
1,666
88
1,000
8,862
47,897
3,620
15,960
20,025
6,085
76
bph
8.35
39.50
11.80
20.12
12.67
8.65
61.52
23.09
13.37
20.96
34.76
11.03
42.32
9.80
time
0.020
0.001
0.018
0.228
0.002
0.001
0.001
0.005
0.045
0.002
0.006
0.022
0.003
0.001
bph
0.07
24.50
1.50
3.01
3.06
0.21
46.78
8.68
2.70
7.81
18.55
1.96
20.40
0.30
time
0.021
0.002
0.023
0.272
0.002
0.001
0.001
0.007
0.055
0.003
0.008
0.025
0.004
0.001
block
bump2
c1
cylinder
fru
grid16
hanger
hutch
hydra
mdg1b
shaft
steven
test
ucd3d
101,401
1,665
78,618
500,055
5,124
4,096
93,750
1,189
71,572
482,900
4,360
3,375
99.47%
64.97%
96.98%
86.82%
94.91%
99.01%
28.14%
81.44%
94.25%
82.89%
70.65%
96.52%
57.87%
97.23%
95.98%
27.25%
89.59%
71.38%
84.95%
93.24%
4.09%
64.43%
89.50%
57.28%
35.44%
90.82%
42.04%
79.85%
382171
8,790
98,357
4,510
9,218
96,030
3,198
2,646
8,172
141,960
3,710
6,883
81,832
2,386
2,000
Table 2. Connectivity compression results. Vcorris the fraction of correctly predicted vertex indices;
Hcorris the fraction of hexahedra with all indices correctly predicted; bph is bits per hexahedron.
2.6. Results
We here present results of running our connectivity coder on fourteen meshes in their orig
inal orderings (available at http://www.cc.gatech.edu/~lindstro/data/hexzip/) on a
Linux PC with two 3.2 GHz Intel Xeon CPUs, 2 GB of RAM, and a 10 KRPM SCSI disk.
Table 2 lists statistics for the meshes and the performance of the DFCM predictor in terms
of correctly predicted vertex indices. Considering that no effort was made to optimize
the vertex or element order, the prediction accuracy is remarkably high for such a simple
scheme, which is also reflected in the compression rates. Good compression is achieved for
all meshes but ‘hanger’, which has few elements (171) and little regularity to tease out.
We compare our scheme with a stripped down implementation of Isenburg and Alliez’
chvm coder [4], which is the best hexahedral mesh compressor that we know of. For calibra
tion we also compare with bzip2 and gzip applied directly to the index list. All methods
begin with a memory resident index list (not included in the memory footprint) and write
Page 7
1
10
100
1,000
10,000
blockbump2 c1cylinderfru grid16hangerhutchhydra mdg1bshaftsteventestucd3d
compression ratio
bzip2gzip chvmdfcmconfidencebyte code reprediction
Figure 2.
method are broken down into five components, including the final gzip compression phase.
Connectivity compression rates for several meshes and methods. Results for the new
mesh
compression ratio
bzip2 gzip
4.024.40
3.673.84
3.454.09
3.453.15 1,140
3.884.41
7.124.63
3.293.43
3.784.03
5.976.33
3.75 4.00
3.493.73
3.753.44
3.954.31
5.584.62
time (seconds)
bzip2 gzip
0.805 0.260 0.753 0.021
0.011 0.005 0.010 0.002
0.670 0.225 0.637 0.023
4.912 2.239 4.523 0.272
0.031 0.013 0.039 0.002
0.022 0.010 0.026 0.001
0.003 0.001 0.002 0.001
0.059 0.030 0.064 0.007
4.298 0.342
0.027 0.013 0.029 0.003
0.051 0.026 0.062 0.008
0.721 0.356 0.724 0.025
0.019 0.009 0.019 0.004
0.015 0.006 0.015 0.001
memory footprint (KB)
bzip2 gzip
7,348
279
7,348
279
7,348
279
7,348
279 265,862
7,348
279
7,348
279
7,348
279
7,348
279
7,348
279
7,348
279
7,348
279
7,348
279
7,348
279
7,348
279
chvm
3,780 3,800
126
428
new
chvm
new
chvm
53,613
1,635
41,828
new
427
427
427
427
427
427
427
427
427
427
427
427
427
427
block
bump2
c1
cylinder
fru
grid16
hanger
hutch
hydra
mdg1b
shaft
steven
test
ucd3d
10.4
171
85.0
83.7
262
876 1,230
48.3
863

332
150
487
296
537
3,126
3,029
1,672
6,132
5.47
29.5
94.8
32.8
13.8
131
12.5
842
 0.055

3,147
4,630
47,834
1,586
1,582
Table 3. Compression, wall clock execution time, and memory usage (according to GNUmemusage) for
several methods. chvm [4] was not able to compress the ‘hydra’ mesh due to element degeneracies.
their output to a file. Figure 2 and Table 3 summarize the results. As is evident, our
scheme compresses significantly better than bzip2 and gzip, and sometimes even better
than chvm. Not surprisingly, our method cannot always compete with chvm—which by per
muting vertices, elements, and orientations does not losslessly encode the index list—and
occasionally fares much worse. On the other hand, our lossless method is 20–30 times faster
than chvm and uses very little memory. Although both gzip and our scheme make use of
the zlib library, we gain in speed by rapidly and effectively reducing the amount of data
to be compressed. As a result, the zlib phase adds only about 20% to the running time.
Our compressor can be implemented using a few simple arrays. With 12bit DFCM hash
indices, its memory footprint is 427 KB: 132 KB for the hash tables, 32 + 262 KB for the
zlib I/O buffers and internal state, plus a few more bytes to hold the last two hexahedra.
Page 8
By comparison, chvm uses as much as 260 MB of RAM, which is prohibitive for memory
starved applications like numerical simulations. Finally, our implementation of encoder
and decoder transforms (without zlib) is only 200 lines of C++code, which is insignificant
compared to the more than 10,000 lines in our implementation of the chvm encoder alone.
2.7. Limitations
The main drawback of our method is the reliance on coherently ordered vertex and ele
ment arrays. Among the several mesh generators we have used, we have not yet encountered
an incoherently ordered mesh, however some processing tasks may inadvertently scramble
these arrays.To evaluate the sensitivity to ordering, we performed three experiments
in which we randomly permuted vertices, hexahedra, and orientations. These experiments
show that, at 2.4:1 average compression, randomizing the vertex order is far more damaging
than scrambling the element order or orientation, which both allow for 5:1 compression. In
case of incoherent input, preliminary results indicate that reordering can be very effective,
and sometimes allows improving compression well beyond the ratios presented here.
2.8. Discussion
Our preconditioning scheme has been designed around the assumption that a compressor
like zlib will remove any remaining redundancy in the byte stream. We here consider
alternatives in case such a compressor, for whatever reason, is not available. The purpose
of this discussion is twofold: (1) to further improve the scheme in this situation, and (2) to
dismiss the need for extra complexity in the transform phase whenever zlib is available.
As evidenced in Table 2, it is quite common that all eight vertices of an element are
correctly predicted. If this likelihood exceeds
of our benchmark meshes, it is beneficial to use a single bit to flag allcorrect predictions
and to conditionally omit the pervertex flags. Such perelement flags can be packed into
a single byte by encoding eight elements at a time. Without zlib this change boosts the
maximum compression from 32:1 to 256:1 and improves the average compression by 94%.
However, this change surprisingly has a net negative effect on zlib, in spite of a near 2:1
decimation of the byte stream, and hence we omitted this step from our main scheme.
Although residuals due to misprediction are mostly small, some not so small residuals
occur with high frequency. To more efficiently encode those residuals, a recency transform
such as movetofront [15] may be inserted before the byte coding stage, which effectively
reduces the code length of frequent residuals. Without zlib, such a transform improves
compression by 8%, though it interferes with zlib by constantly “relabeling” symbols.
Finally, the use of byte code limits residual compression to 4:1 by requiring codewords
to be at least eight bits long. We applied a coding scheme similar to Anh and Moffat’s
worldaligned coder [14], which packs several residuals as short as a single bit each into a 32
bit word. Together with a perelement flag and recency transform, this further improved
compression by 18%, however at a significant penalty in code complexity. This is due
to the fact that this scheme does not emit one codeword per input symbol, which may
indefinitely delay residuals and prevent them from being encoded and interleaved with the
corresponding prediction flags. Addressing this requires potentially significant buffering of
prediction flags and/or periodic flushing of buffered residuals in both encoder and decoder,
complicating the implementation. Finally, such a bit packing approach hurts the bytelevel
regularity in the stream, which ultimately has a negative impact on zlib.
1
8= 12.5%, as is the case for all but one
Page 9
?
00
0
−1
+1
+1
?
−1
+2
+2
?
+1
+1
+1
?
?
0
−1
+1
+1
?
−1
+1
+1
0
?
−2
+1
+1
+1
?
+1
?
−1
+1
−1
+2
+2
?
0
0
+1
+1
?
+2
+1
?
0
+1
?
0
−1
+1
−1
+1
+2
?
−2
+1
+1
+1
+1
?
−1
0
0
+1
+1
?
+1
+1
?
−1
−1
+2
−1
+2
+2
?
+1
+1
+1
?
−1
+2
+1
?
−1
+1
+1
?
+1
−1
−1
+1
−1
+1
+1
?
−1
+1
+1
+1
?
−1
−1
+2
+1
?
00
0
+1
0x000x01
0x02, 0x03
0x060x07 0x08–0x0f
0x160x17 0x18
0x19, 0x1b, 0x1d, 0x1f
0x1a 0x1e
0x610x65
0x60, 0x62, 0x64, 0x66
0x670x680x69
0x70–0x77 0x780x79
0x7c, 0x7d
0x7e0x7f
Figure 3. Spectral predictor weights (structurally equivalent cases have been omitted). Gray indicates
unknown samples; green are either known or unknown with zero weight; blue have negative weight;
and red have positive weight. Each weight is to be normalized by the sum of weights within a stencil.
3. Geometry compression
For completeness we here briefly outline a novel scheme for lossless compression of vertex
coordinates and any other vertexcentered floatingpoint data. A full treatment of this
problem and detailed results are deferred to an extended version of this paper.
As is common [3, 4], we use predictive coding to compress vertices in their order of
reference from the index list, which on decoding specifies where in the array to place each
decompressed vertex. We maintain a flag with each vertex to specify whether it has been
compressed.2As a consequence of following this ordering, we usually end up with several
different configurations of encoded and notyetencoded vertices within a single element,
which is the only adjacency information we maintain and can exploit for prediction. To
make the best possible use of available neighbors, we employ spectral prediction [16] by pre
computing “optimal” rational weights for all 27= 128 possible configurations (Figure 3).
Our derivation shows parallelogram [4] and Lorenzo prediction [6,17] to be special cases
(0x70 respectively 0x7f in Figure 3) of spectral prediction.
Similar to the case of index compression, we use a single bit to signal perfect predictions
and compress scalars in groups of eight. As in Section 2.3, we also order residuals by
magnitude and byte code the ordinals. The resulting stream, which is kept separate from
the index stream, is then compressed with zlib.
2A streaming implementation [9] would maintain flags and geometry only for the active front of vertices.
Page 10
Using the meshes from Section 2.6 stored in double precision, we obtain a median lossless
compression of 6.3, and as much as 950 times reduction of the ‘block’ geometry. This
amounts to a 60% average improvement over using the same coding scheme but the much
smaller set of spectral predictors presented in [4]. We also more than double the compression
over running gzip on the raw floatingpoint array, and attribute these results to the fact that
most traversals result in an abundance of 3D Lorenzo predictions, which offer outstanding
prediction of the often regularly shaped hexahedral elements. Finally, we note that our
geometry compression scheme is both fast and memory efficient, and requires as little as
384 bytes for the 128 × 8 threebit spectral weights.
4. Conclusion
We have presented the first truly lossless compression scheme for coding connectivity and
geometry in unstructured hexahedral meshes. Our approach combines bytealigned predic
tive coding with a subsequent zlib compression phase. This simple combination results in
excellent compression at a minimal CPU and memory cost. Our scheme exploits the regu
larity of the structure and ordering of hexahedral mesh elements. For incoherently ordered
meshes, future work will investigate reordering strategies to further improve compression.
References
[1] S. E. Benzley, E. Perry, K. Merkley, and B. Clark, “A comparison of allhexahedral and alltetrahedral
finite element meshes for elastic and elastoplastic analysis,” in International Meshing Roundtable,
1995, pp. 179–191.
[2] S. J. Owen, “A survey of unstructured mesh generation technology,” in International Meshing
Roundtable, 1998, pp. 239–267.
[3] P. Alliez and C. Gotsman, Recent Advances in Compression of 3D Meshes.
[4] M. Isenburg and P. Alliez, “Compressing hexahedral volume meshes,” Graphical Models, vol. 65, no. 4,
pp. 239–257, 2003.
[5] S. Prat, P. Gioia, Y. Bertrand, and D. Meneveaux, “Connectivity compression in an arbitrary dimen
sion,” The Visual Computer, vol. 21, no. 8–10, pp. 876–885, 2005.
[6] P. Lindstrom and M. Isenburg, “Fast and efficient compression of floatingpoint data,” IEEE Transac
tions on Visualization and Computer Graphics, vol. 12, no. 5, pp. 1245–1250, 2006.
[7] M. Burtscher and P. Ratanaworabhan, “High throughput compression of doubleprecision floatingpoint
data,” in IEEE Data Compression Conference, 2007, pp. 293–302.
[8] M. Isenburg, P. Lindstrom, and J. Snoeyink, “Streaming compression of triangle meshes,” in Symposium
on Geometry Processing, 2005, pp. 111–118.
[9] M. Isenburg, P. Lindstrom, S. Gumhold, and J. Shewchuk, “Streaming compression of tetrahedral
volume meshes,” in Graphics Interface, 2006, pp. 115–121.
[10] Y. Sazeides and J. E. Smith, “The predictability of data values,” in ACM/IEEE International Sympo
sium on Microarchitecture, 1997, pp. 248–258.
[11] M. Isenburg and J. Snoeyink, “Binary compression rates for ASCII formats,” in International Confer
ence on 3D Web Technology, 2003, pp. 173–178.
[12] M. Burtscher, “VPC3: A fast and effective tracecompression algorithm,” ACM SIGMETRICS Per
formance Evaluation Review, vol. 32, no. 1, pp. 167–176, 2004.
[13] B. Goeman, H. Vandierendonck, and K. de Bosschere, “Differential FCM: Increasing value predic
tion accuracy by improving table usage efficiency,” in International Symposium on HighPerformance
Computer Architecture, 2001, pp. 207–216.
[14] V. N. Anh and A. Moffat, “Inverted index compression using wordaligned binary codes,” Information
Retrieval, vol. 8, no. 1, pp. 151–166, 2005.
[15] J. L. Bentley, D. D. Sleator, R. E. Tarjan, and V. K. Wei, “A locally adaptive data compression
scheme,” Communications of the ACM, vol. 29, no. 4, pp. 320–330, 1986.
[16] L. Ibarria, P. Lindstrom, and J. Rossignac, “Spectral predictors,” in IEEE Data Compression Confer
ence, 2007, pp. 163–172.
[17] L. Ibarria, P. Lindstrom, J. Rossignac, and A. Szymczak, “Outofcore compression and decompression
of large ndimensional scalar fields,” Computer Graphics Forum, vol. 22, no. 3, pp. 343–348, 2003.
Springer, 2006, pp. 3–26.
View other sources
Hide other sources
 Available from Peter Lindstrom · May 22, 2014
 Available from psu.edu