Use lz4 instead of zstd, add prebuilt static library
This commit is contained in:
parent
c9af230f3a
commit
9f6ba5dd1d
22
README.md
22
README.md
@ -29,19 +29,15 @@ On your **reMarkable** nothing is needed, unless you want...
|
||||
|
||||
### Sub-second latency
|
||||
|
||||
To achieve sub-second latency, you'll need [zstd](https://zstd.net) on your
|
||||
host and on your reMarkable.
|
||||
To achieve sub-second latency, you'll need [lz4](https://github.com/lz4/lz4)
|
||||
on your host and on your reMarkable.
|
||||
|
||||
You can install `zstd` on your host with your usual package manager. On Ubuntu,
|
||||
`apt install zstd` will work.
|
||||
You can install `lz4` on your host with your usual package manager. On Ubuntu,
|
||||
`apt install liblz4-tool` will do the trick.
|
||||
|
||||
On your **reMarkable** you can do `opkg install zstd` if you have [entware](https://github.com/evidlo/remarkable_entware) installed. If you don't you can use the binary provided in this repository. In general you shouldn't trust binaries strangers on the internet provide to you, but I provide the option if you don't want the hassle of installing entware.
|
||||
|
||||
You can install `zstd` on your reMarkable with the following steps:
|
||||
- Copy zstd: `scp zstd.arm root@10.11.99.1:~/zstd`
|
||||
- SSH to your reMarkable `ssh root@10.11.99.1`
|
||||
- Create the opt lib directory `mkdir -p /opt/lib`
|
||||
- Symlink a needed library `ln -s /lib/ld-linux-armhf.so.3 /opt/lib/ld-linux.so.3`
|
||||
|
||||
This is currently a bit cumbersome. I'm trying to make this a bit easier.
|
||||
On your **reMarkable** you'll need a binary of `lz4` build for the arm platform,
|
||||
you can do this yourself by [installing the reMarkable toolchain](https://remarkablewiki.com/devel/qt_creator#toolchain)
|
||||
and compiling `lz4` from source with the toolchain enabled, or you can use the
|
||||
statically linked binary I have already built and put in this repo.
|
||||
|
||||
Copy the `lz4` program to your reMarkable with `scp lz4.arm.static root@10.11.99.1:~/lz4` and you're ready to go.
|
||||
|
BIN
lz4.arm.static
Executable file
BIN
lz4.arm.static
Executable file
Binary file not shown.
21
reStream.sh
21
reStream.sh
@ -11,7 +11,7 @@ bytes_per_pixel=2
|
||||
loop_wait="true"
|
||||
loglevel="info"
|
||||
|
||||
# check if we are able to reach the remarkabl
|
||||
# check if we are able to reach the remarkable
|
||||
if ! ssh "$ssh_host" true; then
|
||||
echo "$ssh_host unreachable"
|
||||
exit 1
|
||||
@ -25,22 +25,23 @@ fallback_to_gzip() {
|
||||
sleep 2
|
||||
}
|
||||
|
||||
# check if zstd is present on remarkable
|
||||
if ssh "$ssh_host" "[ -f /opt/bin/zstd ]"; then
|
||||
compress="/opt/bin/zstd"
|
||||
elif ssh "$ssh_host" "[ -f ~/zstd ]"; then
|
||||
compress="~/zstd"
|
||||
|
||||
# check if lz4 is present on remarkable
|
||||
if ssh "$ssh_host" "[ -f /opt/bin/lz4 ]"; then
|
||||
compress="/opt/bin/lz4"
|
||||
elif ssh "$ssh_host" "[ -f ~/lz4 ]"; then
|
||||
compress="~/lz4"
|
||||
fi
|
||||
|
||||
# gracefully degrade to gzip if zstd is not present on remarkable or host
|
||||
# gracefully degrade to gzip if is not present on remarkable or host
|
||||
if [ -z "$compress" ]; then
|
||||
echo "Your remarkable does not have zstd."
|
||||
echo "Your remarkable does not have lz4."
|
||||
fallback_to_gzip
|
||||
elif ! which zstd; then
|
||||
echo "Your host does not have zstd."
|
||||
echo "Your host does not have lz4."
|
||||
fallback_to_gzip
|
||||
else
|
||||
decompress="zstd -d"
|
||||
decompress="lz4 -d"
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user