Comments (2)
on little endian systems, i'm pretty certain the memory layout of such a struct would be '\x01\x02\x00\x00\x00\x03'
(taking only about the middle element) -- the padding is most likely to come after the value, so \x02
is expanded to \x02\x00\x00\x00
.
if you can find a documentation on how it should be done, please send a link.
from construct.
@kankri - does this solve your issue?
https://github.com/tomerfiliba/construct3/blob/master/construct3/macros.py#L36
from construct.
Related Issues (20)
- Determine byte size of construct containing a Switch() using sizeof() with context fails on parent construct HOT 21
- Proposals for improvements HOT 27
- [Feature] Construct build to return also parse
- [Example] ELF64 parser HOT 5
- Rebuild() with Conditional/Optional Keys HOT 2
- Scope issue when using BitStruct
- Using custom functions in Rebuild HOT 1
- pytest 8.0.0 does not run the testsuite
- sizeof() Terminated raises an error instead of returning 0 HOT 1
- `OneOf` validator fails when given a set of byte characters HOT 5
- Question: how to get the subcontext length in an Adapter? HOT 2
- PaddedString decoding error handling HOT 8
- 2.10.70: pytest fails because it cannot find `tests` HOT 7
- Fixing `_sizeof()` for variable-size fields. HOT 1
- Construct contributions to an academic paper? HOT 3
- `Computed` fields that defined later not seen in fields defined above HOT 2
- Long strings in `ListContainer` are not truncated
- Key Error: Accessing previous element in Array or GreedyRange during parsing. HOT 1
- Seek on write failed HOT 1
- 2.10.70 introduces incompatibility for non-tellable streams
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from construct.