9,302 questions
0
votes
1
answer
77
views
Apply Quantization on a CNN
I want to apply a quantization function to a deep CNN. This CNN is used for an image classification(in 4 classes) task, and my data consists of 224×224 images. When I run this code, I get an error. ...
4
votes
1
answer
165
views
LZSS - handling the compression of data that contains token-like strings
I've been working on implementing some compression algorithms in C/C++ and JavaScript, I've started by building out LZSS. So far everything seems good. I check my dictionary buffer for matches, and if ...
1
vote
0
answers
40
views
Azure ODATA Source supporting compression
I‘m using an Azure Data Factory with an ODATA source from an external system. While everything works fine, I noticed the slow performance. So I checked this with postman and spotted immediately, that ...
Tooling
0
votes
1
replies
43
views
How does a Deflate compressor know when to choose Dynamic or Fixed Huffman codes?
I have been following the inner working of Deflate compression and I have came across a junction in which I need
to understand how efficient are compressor's choices with this lossless compression ...
0
votes
2
answers
155
views
How can I store Huffman-encoded bits into a truly compressed binary file in Java?
I'm building a Huffman compressor in Java.
I already have: The original text, the Huffman code table (Map<Character, String>), and the order of character appearance.
My current goal is to write ...
0
votes
0
answers
51
views
Redis data structure and storage optimzation
I have an application which keeps appending data for a wide range of sessionIDs and expiring them in a few hours, currently we use Redis List data structure and having the SessionID as the key.
For ...
4
votes
2
answers
143
views
Decompress compressed value of type varchar with UTF-8 collation in SQL Server
I have a table with a column of type VARCHAR(MAX) with COLLATE Latin1_General_100_CI_AS_SC_UTF8 in a SQL Server database.
I want to compress the values in the column with built-in COMPRESS() function. ...
-3
votes
1
answer
60
views
How to decompress zlib format package in dissector?
I wrote a dissector. I need to decompress zlib format package when analyzing data.
such as:
content_bytes = zlib.decompress(content_bytes)
I have tried:
local zlib = require("zlib") -- got ...
4
votes
3
answers
200
views
How to gzip a string to a file so that it can be unzipped with regular gzip?
I want to serialize R objects as JSON for other programs to use, and gzip them for efficient transport. So I run
data <- list(foo = "bar")
readr::write_file(jsonlite::as_gzjson_b64(data), ...
3
votes
1
answer
173
views
Zlib deflate uncompress data error not able to inflate
Plese guide me, what I am doing wrong. I am not able to coming up with working solution.
I am trying to inflate PDF - deflate stream with Zlib. The below code written by me.
int main(){
char* ...
1
vote
1
answer
81
views
Serializing and compressing std::map using Boost [closed]
I'm trying to serialize and compress a std::map using Boost. Here's the serialization code:
#include <boost/archive/binary_oarchive.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#...
0
votes
2
answers
124
views
Scala Spark decompress lz4 csv
Is there any way to decompress csv lz4 files by Spark?
I tried following approaches:
First:
sparkSession.read
.option("delimiter", ",")
.option("compression", "...
0
votes
1
answer
273
views
OSError: Can't synchronously read data (can't open directory) when trying to index retrieve values from a hdf5 file
I generated a hdf5 file with the code below:
# Create forecast training data file
import h5py
import hdf5plugin
#mmap_array = np.memmap('video_prediction_224.dat', dtype='uint8', mode='w+', shape=(...
0
votes
0
answers
54
views
How to extract first n rows of a .tsv.bgz file with gsutil?
How to extract the first n rows of a block compressed tab-separated value text file (.tsv.bgz), which could only be accessed with gsutil, into a text file? The original file is very large, so I wonder ...
0
votes
1
answer
78
views
Dictionary compression demo does not work
I understand that dictionary compression is shipped with Chrome 130 and later. I am trying to get the demo at https://compression-dictionary-transport-threejs-demo.glitch.me/ to work, but for some ...
7
votes
1
answer
157
views
Compressing data twice with gzip with a high ratio the second time
Note the following gzip compressions:
$ seq 1000000 > file.txt
$ ls -l
total 6728
-rw-r--r--. 1 felix felix 6888896 jun 6 18:29 file.txt
$ gzip -f -k file.txt
$ ls -l
total 8808
-rw-r--r--. 1 ...
0
votes
1
answer
68
views
Error using Datastax SchemaBuilder for creating Cassandra table in Java
I'm trying to create a Cassandra table from Java code using Datastax's SchemaBuilder class. I'm essentially trying to convert this CQL query:
CREATE TABLE <tablename> (id text, key blob, val ...
0
votes
2
answers
144
views
Text compression algorithm that allows appending and searching without decompression
I am searching for a text compression algorithm that fulfills the following criteria:
must
allow to append/add new text to existing compressed text without decompression
allow searching within the ...
1
vote
0
answers
131
views
How to Compress TIF with JPEG compression?
I'm trying to accomplish the following:
Open a TIF image file (which contains an alpha channel and Geo Location data)
remove the Alpha channel
Save a compressed version of the TIF file using JPEG ...
0
votes
0
answers
43
views
How to further decrease financial data size?
I’ve been working on compressing tick data and have made some progress, but I’m looking for ways to further optimize file sizes. Currently, I use delta encoding followed by saving the data in Parquet ...
0
votes
1
answer
40
views
how to compress response in nodeJS without using express and see results in postman naturally
I'm currently working on a nodeJS implementation(I'm new with node). Basically I have created an API Gateway with a Lambda Function(GET REST service) to query all the records for a postgreSQL table. ...
0
votes
1
answer
84
views
How can I generate a concatenated deflate stream without intermediate BFINAL bits in .NET for differential updates?
I'm working on implementing a differential update mechanism in .NET. The idea is to split data into 64 KB blocks and compress each block independently using SharpZipLib in raw mode (i.e., without the ...
0
votes
1
answer
100
views
Are the blocks in AppxBlockMap.xml directly tied to Deflate-compressed blocks in MSIX packages?
I'm trying to understand the relationship between the blocks defined in the AppxBlockMap.xml file of an MSIX package and the compression process, specifically the Deflate algorithm used in ZIP-based ...
1
vote
1
answer
343
views
Compress HTML pages in Nuxt 3 beyond static assets
I'm currently working on a Nuxt 3 project with the following configuration:
export default defineNuxtConfig({
srcDir: "src/",
devtools: { enabled: true },
ssr: true,
modules: [ ... ]...
0
votes
0
answers
49
views
Get audio frame from audio file in Flutter
I am using flutter_quick_vide_encoder Flutter package to create a video from images. The package documentation explains, and there is also an example, on how to create a video with PCM audio generated ...
0
votes
1
answer
41
views
What would happen if I store signed values in a PNG with the opposite byte order?
Aside from the image not being properly represented in something like an image editor, if my goal is to simply compress the pixels, and then retrieve them by decoding and reading them as I wrote them, ...
0
votes
1
answer
51
views
Get the actual (Original) resolution of a High quality image in ReactNative
When I used Image.resolveAssetSource, I was getting a null value when using an image URL instead of a local image.
When I used onLoad, I received {"height": 972, "width": 1296}, ...
0
votes
1
answer
39
views
Is it possible to subdivide the surface of a 3D Sphere (Earth) using 256 sided polygons?
Background for purpose sparse/compressible data structure/compressible honeycumbs, vague description to give you an idea: This would allow an array of [0..255] connection points hopefully. If all of ...
0
votes
1
answer
100
views
Transparent filesystem in pyfuse with encryption and compression
I'm trying to make a simple transparent filesystem in fuse. I'm using this guide as a basis. This code works perfectly. I'm trying to modify it so that it compresses and then encrypts as well.
So far ...
1
vote
0
answers
94
views
Can I use `brotliCompressSync` for `Transfer-Encoding: chunked` response in Node.js?
I am playing around with compressing on Node.js server. While my streaming implementation of brotli-compression is working just fine, I can't get compression to work using brotliCompressSync method. I ...
2
votes
0
answers
93
views
How to make RePair compression algorithm multithreaded
The Re-Pair algorithm performs text compression by recursively replacing the most frequent pair of characters occurring in the text.
The algorithm gets very slow on large texts, I was wondering how ...
0
votes
2
answers
212
views
Bulk decompressing files on GCS
I have a shell script that processes compressed (gzipped) .avro files stored in GCS and loads them into BigQuery.
Here's the current small setup:
process_file.sh:
#!/bin/bash
set -e
PROJECT_ID="...
0
votes
0
answers
990
views
Argument of type 'Buffer' is not assignable to parameter of type 'InputType'
My project has been using zlib for its decompression methods for a long time. Suddenly while trying to update packages its throwing a TypeError in the following code:
Argument of type 'Buffer' is not ...
0
votes
0
answers
32
views
Can I integrate data compression into the VcXsrv source code for X11 communication?
I’m exploring the possibility of adding data compression functionality to the VcXsrv X Server to optimize X11 communication over the network. Specifically, I want to compress X11 data before ...
0
votes
1
answer
105
views
OpenCV: Saving image files - Difference between cv.imwrite and f.write()?
I'm importing images from a security camera for image processing. After importing the image, I want to save the image for archiving (processing will happen on the fly).
I see two available methods for ...
1
vote
0
answers
271
views
K4os.Compression.LZ4: Could not load file or assembly 'System.Memory, Version=4.0.1.2, ...'
I'm at a loss.
I am on .NET Framework 4.8.
I installed K4os.Compression.LZ4 1.3.8 via Nuget and use LZ4Pickler.Pickle().
My required dependencies according to https://www.nuget.org/packages/K4os....
1
vote
0
answers
53
views
Issues with MP3-like Compression: Quantization and File Size
I’m trying to implement an MP3-like compression algorithm for audio and have followed the general steps, but I’m encountering a few issues with the quantization step. Here's the overall process I'm ...
2
votes
1
answer
222
views
What's the best compression algorithm for sets of images that share conceptual similarities?
I want to compress several hundred images together into a single file. The images are all scans of Magic: The Gathering cards, which means they have large blocks of similar color and share many ...
0
votes
0
answers
58
views
PySpark optimize using partition by size file and compression strategy Parquet file
I have a PySpark DataFrame result after preprocessing and ETL. I can calculate the current size of DataFrame using the following syntax:
size_estimator = spark._jvm.org.apache.spark.util.SizeEstimator
...
1
vote
1
answer
136
views
How to use python to create ORC file compressed with ZLIB compression level 9?
I want to create an ORC file compressed with ZLIB compression level 9.
Thing is, when using pyarrow.orc, I can only choose between "Speed" and "Compression" mode,
and can't control ...
2
votes
0
answers
55
views
Minimum RAM for a LZString decompressor
In an embedded system where RAM is at premium, I need to decompress a LZString-compressed piece of data of roughly 1kByte max, producing less than 2kByte of (ASCII JSON) characters when decompressed. ...
0
votes
1
answer
171
views
Some trash data written on my compressed files ( My own algorithm )
This is my program to compress data (it is free but has copyright for commercial usage) . This program suppose to read a file as data-number and find a huge nth root of file (depending on file size) ...
1
vote
1
answer
764
views
System.IO.InvalidDataException: 'The archive entry was compressed using an unsupported compression method.'
I am using ASP.NET Core 6.0. I have an API which returns compressed data. Simplified version of my code looks like this:
[HttpPost("[action]", Name = "GetData")]
public ...
0
votes
1
answer
67
views
How to Match Compression Format for Specific Compressed Data?
I'm trying to decompress and recompress a specific piece of compressed data in Python to reproduce the original compressed output. However, I can't achieve a match with zlib, and I'm unsure what ...
0
votes
1
answer
180
views
Writing a png image from scratch in C++ after compression via zlib
My goal is to write a png image from a starting bitmap image. I know the existence of many libraries, but I need to write it from scratch.
The first function I have implemented is "...
1
vote
0
answers
85
views
Wrap buffer in miniz tinfl_decompress
I am trying to use MINIZ library in my embedded device, and am almost done with success except for an issue in decompressing, similar to the one reported here:
Wrap buffer in minizs tinfl_decompress
...
0
votes
1
answer
276
views
Azure Data Factory : Error 409 when trying to unzip files in blob storage
I have compressed files in blob storage and I'm trying to unzip them with an Azure Data Factory activity.
Each compressed file is composed of compressed folders inside. So when I try to unzip, it has ...
1
vote
1
answer
314
views
How to decompress raw PKZIP data without zip header in python?
I want to to decompress raw data from a file in an exotic format, but I know that the compression method is the same that is used in a ZIP file (PKZIP).
In the file the PK\03\04 signature is missing. ...
1
vote
2
answers
190
views
How to differentiate between optimal prefix codes and Huffman codes?
Question
While studying encoding theory, I encountered a set of code tables where I need to determine whether they belong to one of the following categories:
A:Prefix codes
B:Huffman codes
C:Optimal ...
0
votes
0
answers
81
views
compression on TIFFs - two identical images, same compression gives different sizes
Running the risk of this being a stupid question, I ran into a strange mystery with TIFF image files that I hope that some compression guru can explain.
The mystery is this: Two seemingly in all ...