我正在尝试查看一些 zst 格式的日志文件。我可以用来zstdcat查看内容,但是当我这样做时vim <filename.zst>,只有乱码文本。有没有类似的方法zstdcat用 Vim 查看 zst 文件?
AWS Redshift最近发布了自己的新编码格式AZ64,他们说:
与ZSTD编码相比,AZ64消耗的存储空间减少了5–10%,速度提高了70%
当我使用A时,ANALYZE COMPRESSION my_table我仍然收到ZSTD其所有列的编码格式。
因此,是否真的建议将其作为ZSTD上的编码格式?我是否会天真的喜欢AZ64?
我目前正在开发一个 python 应用程序,它可以与 facebook api 一起使用。众所周知,facebook热爱自己的技术,正在与zstd合作进行数据压缩。
问题:facebook 要么返回带有正常 json 的未压缩响应,要么如果响应较长,则返回 zstd 压缩 json。
我当前的代码是这样的:
import zstd
import json
def handle_response(response)
json = None
try:
json = json.loads(zstd.decompress(response.content))
except:
json = json.loads(response.text)
return json
Run Code Online (Sandbox Code Playgroud)
我目前想知道是否有更干净的方法来执行此操作甚至检测 zstd。
我在 Java 中使用 Zstd 压缩来压缩大型 JSON 有效负载。我正在使用 Java 的 zstd-jni 库中的方法。我从 JSON 字符串创建一个字节数组并使用此方法。
公共静态字节[]压缩(字节[] var0,int var1)
我读到,在压缩和解压缩期间传递字典时,ZSTD 会给出更优化的结果。如何创建 ZstdDictCompress 对象?我应该将什么字节数组和整数传递给构造函数?
公共静态长压缩(字节[] var0,字节[] var1,ZstdDictCompress var2)
我对 C++ 很陌生,我想std:string通过Zstd压缩库压缩一个对象,但到目前为止,我无法通过谷歌搜索找到用于此目的的 C++ 示例代码。我找到了示例 C 代码,但似乎他们正在使用 C 样式字符数组而不是std:string对象。
示例 C 代码:https : //github.com/facebook/zstd/blob/dev/examples/simple_compression.c
/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may …Run Code Online (Sandbox Code Playgroud) zstd ×5
compression ×3
c++ ×1
dictionary ×1
encoding ×1
java ×1
json ×1
python ×1
string ×1
vim ×1