Questions tagged [unpack]
A function in several scripting languages for unpacking binary data into native types for the language in question. The opposite of the 'pack' function. For the Python concept, use 'iterable-unpacking'. This tag should be used with a programming language tag as well. While also used as directive or pragma in some compilers to ignore standard variable alignment for data aggregates (i.e. struct), do not use this tag for posts on that subject.
unpack
622
questions
0
votes
0
answers
24
views
In Yocto, how do I install the libiec61850 library and examples on a Linux target?
I've created a Linux image with overlays, docker, docker compose, added and configured users and it all works. I'm now trying to install libiec61850 library and run examples. I've installed the ...
1
vote
0
answers
49
views
struct.error: unpack requires a buffer of 81 bytes
In the following code, the top level is parse(), and there are some manipulations done to the unpacker and payload arguments that get fed into the unpack_data, which ultimately breaks with the error ...
0
votes
0
answers
35
views
I am taking error= ValueError: not enough values to unpack (expected 2, got 0)
I tried to make this code based on the source code below, I want to get the URLs, but the code didn't work.
Can you please help me find the error?
**code**
!pip install DuckDuckGoImages
import ...
0
votes
0
answers
32
views
who can explain `foo, bar = foo[bar] = [1,2,3], 2`? (python) [duplicate]
I cannot understand the code as follows:
>>> foo, bar = foo[bar] = [1,2,3], 2
>>> foo
>>> [1, 2, ([...], 2)]
>>> bar
>>> 2
In my opinion,
>>> foo,...
1
vote
1
answer
98
views
Clojure equivalent to the Perl "unpack" function
In Perl, unpack can be used to neatly split a string of fixed-length fields into its parts. What follows is an example of it being used to accomplish this:
# get a 5-byte string, skip 3, then grab 2 8-...
0
votes
2
answers
61
views
stuct.unpack() to read hex dump file data in different order
I am using struct.unpack() to read a hex dump file and convert it to its binary representation since only a few bits are of interest to me. Below is an example of one read.
bin(struct.unpack('<...
0
votes
0
answers
8
views
TypeError: cannot unpack non-iterable NoneType object. i want get df of twelvedata.timeseries.timeSeries object how can i do this i was abl todo it b4
i'm trying to make a method that would return me a df:
while doing it i am using twelvedata.
i am getting a type error but a few days before i was able to run it without errors !
here are syntax and ...
0
votes
0
answers
43
views
Python uses the unpack function of the strike module to decode double floating point numbers
I am using unpack to parse a piece of data, this is a byte stream in it
(\x31\x2e\x91\x5a\x8a\x20\xbd\x3e),this corresponds to the double floating-point number in the figure below,I unpack according ...
0
votes
0
answers
20
views
How to use the unpack function in the struct module in python
I am using unpack to parse a piece of data, this is a byte stream in it
b'\xc0\x0f\x00\x00\x00\x00\x00\x00\xe8\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', I removed ...
0
votes
0
answers
160
views
Cant save modified files in archive
I'm working on a map editor tool for a game. I can load the contant of a specific *.box archive and load it's contents (files) to listView1 component.
If the file is a "IsReadableFile", then ...
0
votes
1
answer
107
views
How can I check that my Android app is not tampered with during runtime?
I'm a Unity Game Developer, and I develop games on Android. However, recently, my game has been experiencing cheating issues, so I want to check the signature of the Android app to see if users are ...
0
votes
1
answer
81
views
After setting Xamarin forms IOS part of the project as startup option project I get The "UnpackFrameworks" task failed unexpectedly error
For context I opened my other developers GitHub branch of our project in Visual Studio. As soon as I set the project start up option to iOS and tried to run it, I got the error shown below. I am ...
1
vote
1
answer
295
views
Why does struct.unpack() not return a value that I expect?
I have a binary file and I've read the first 50 bytes of it.
data = ftw.read(50)
print(f" Read {len(data)} bytes: {data}")
temp_tuple = struct.unpack("HHHL", data[0:10])
...
1
vote
1
answer
168
views
Processing Linux input events (/dev/input/event*) in PHP
I'm trying to get keyboard events on GNU/Linux using php, with this code:
<?php
$fd = fopen("/dev/input/event0", "rb");
while (true) {
$ev = fread($fd, 24);
$event = ...
0
votes
0
answers
96
views
How to arch06 unpack
does anyone know how to unpack files with the arch06 extension?I want to extract models from the game middle earth shadow of war.
I looked for an answer on the Internet but found nothing.Please help ...