Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
caf209a4
Commit
caf209a4
authored
Feb 13, 2014
by
Mathis Rosenhauer
Browse files
additional testing for encoding sample data
parent
f715432f
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/sampledata.sh
View file @
caf209a4
...
@@ -12,31 +12,51 @@ if [ ! -f $archive ]; then
...
@@ -12,31 +12,51 @@ if [ ! -f $archive ]; then
fi
fi
unzip
-oq
$archive
unzip
-oq
$archive
decode
()
{
$AEC
-c
-d
$3
$1
>
test.dat
cmp
-n
$(
stat
-c
"%s"
$2
)
$2
test.dat
}
code
()
{
$AEC
-c
$3
$2
>
test.rz
cmp
$1
test.rz
}
code_size
()
{
$AEC
-c
$3
$2
>
test.rz
if
[
!
$(
stat
-c
"%s"
test.rz
)
-eq
$(
stat
-c
"%s"
$1
)
]
;
then
echo
"
$1
size mismatch"
exit
1
fi
}
codec
()
{
code
"
$@
"
decode
"
$@
"
}
cosdec
()
{
code_size
"
$@
"
decode
"
$@
"
}
echo
All Options
echo
All Options
ln
-f
${
ALLO
}
/test_P512n22.dat
${
ALLO
}
/test_p512n22.dat
ln
-f
${
ALLO
}
/test_P512n22.dat
${
ALLO
}
/test_p512n22.dat
for
i
in
01 02 03 04
for
i
in
01 02 03 04
do
do
$AEC
-c
-d
-n
$i
-j16
-r16
$ALLO
/test_p256n
${
i
}
-basic
.rz
>
test.dat
uf
=
$ALLO
/test_p256n
${
i
}
.dat
ref
=
$ALLO
/test_p256n
${
i
}
.dat
codec
$ALLO
/test_p256n
${
i
}
-basic
.rz
$uf
"-n
$i
-j16 -r16"
refsize
=
$(
stat
-c
"%s"
$ref
)
codec
$ALLO
/test_p256n
${
i
}
-restricted
.rz
$uf
"-n
$i
-j16 -r16 -t"
cmp
-n
$refsize
$ref
test.dat
$AEC
-c
-n
$i
-j16
-r16
$ref
>
test.rz
cmp
$ALLO
/test_p256n
${
i
}
-basic
.rz test.rz
$AEC
-c
-d
-n
$i
-j16
-r16
-t
$ALLO
/test_p256n
${
i
}
-restricted
.rz
>
test.dat
cmp
-n
$refsize
$ref
test.dat
$AEC
-c
-n
$i
-j16
-r16
-t
$ref
>
test.rz
cmp
$ALLO
/test_p256n
${
i
}
-restricted
.rz test.rz
done
done
for
i
in
05 06 07 08 09 10 11 12 13 14 15 16
for
i
in
05 06 07 08 09 10 11 12 13 14 15 16
do
do
$AEC
-c
-d
-n
$i
-j16
-r16
$ALLO
/test_p256n
${
i
}
.rz
>
test
.dat
cosdec
$ALLO
/test_p256n
${
i
}
.rz
$ALLO
/test_p256n
${
i
}
.dat
\
cmp
$ALLO
/test_p256n
${
i
}
.dat test.dat
"-n
$i
-j16 -r16"
done
done
for
i
in
17 18 19 20 21 22 23 24
for
i
in
17 18 19 20 21 22 23 24
do
do
$AEC
-c
-d
-n
$i
-j16
-r32
$ALLO
/test_p512n
${
i
}
.rz
>
test
.dat
cosdec
$ALLO
/test_p512n
${
i
}
.rz
$ALLO
/test_p512n
${
i
}
.dat
\
cmp
$ALLO
/test_p512n
${
i
}
.dat test.dat
"-n
$i
-j16 -r32"
done
done
echo
Low Entropy Options
echo
Low Entropy Options
...
@@ -44,30 +64,17 @@ for i in 1 2 3
...
@@ -44,30 +64,17 @@ for i in 1 2 3
do
do
for
j
in
01 02 03 04
for
j
in
01 02 03 04
do
do
$AEC
-c
-d
-n
$j
-j16
-r64
$LOWE
/Lowset
${
i
}
_8bit.n
${
j
}
-basic
.rz
\
uf
=
$LOWE
/Lowset
${
i
}
_8bit.dat
>
test.dat
codec
$LOWE
/Lowset
${
i
}
_8bit.n
${
j
}
-basic
.rz
$uf
"-n
$j
-j16 -r64"
ref
=
$LOWE
/Lowset
${
i
}
_8bit.dat
codec
$LOWE
/Lowset
${
i
}
_8bit.n
${
j
}
-restricted
.rz
$uf
"-n
$j
-j16 -r64 -t"
refsize
=
$(
stat
-c
"%s"
$ref
)
cmp
-n
$refsize
$ref
test.dat
$AEC
-c
-d
-n
$j
-j16
-r64
-t
$LOWE
/Lowset
${
i
}
_8bit.n
${
j
}
-restricted
.rz
\
>
test.dat
cmp
-n
$refsize
$ref
test.dat
done
done
for
j
in
05 06 07 08
for
j
in
05 06 07 08
do
do
$AEC
-c
-d
-n
$j
-j16
-r64
$LOWE
/Lowset
${
i
}
_8bit.n
${
j
}
.rz
\
cosdec
$LOWE
/Lowset
${
i
}
_8bit.n
${
j
}
.rz
$LOWE
/Lowset
${
i
}
_8bit.dat
\
>
test.dat
"-n
$j
-j16 -r64"
ref
=
$LOWE
/Lowset
${
i
}
_8bit.dat
refsize
=
$(
stat
-c
"%s"
$ref
)
cmp
-n
$refsize
$ref
test.dat
done
done
done
done
echo
Extended Parameters
echo
Extended Parameters
decode
$EXTP
/sar32bit.j16.r256.rz
$EXTP
/sar32bit.dat
"-n32 -j16 -r256 -p"
$AEC
-c
-d
-n32
-j16
-r256
-p
$EXTP
/sar32bit.j16.r256.rz
>
test.dat
decode
$EXTP
/sar32bit.j64.r4096.rz
$EXTP
/sar32bit.dat
"-n32 -j64 -r4096 -p"
ref
=
$EXTP
/sar32bit.dat
refsize
=
$(
stat
-c
"%s"
$ref
)
cmp
-n
$refsize
$ref
test.dat
$AEC
-c
-d
-n32
-j64
-r4096
-p
$EXTP
/sar32bit.j64.r4096.rz
>
test.dat
cmp
-n
$refsize
$ref
test.dat
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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