dissect.cstruct 5.0.dev6__py3-none-any.whl → 5.0.dev8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,12 +30,18 @@ from dissect.cstruct.types import (
30
30
  )
31
31
  from dissect.cstruct.util import (
32
32
  dumpstruct,
33
+ f16,
34
+ f32,
35
+ f64,
33
36
  hexdump,
34
37
  p8,
35
38
  p16,
36
39
  p32,
37
40
  p64,
38
41
  pack,
42
+ pf16,
43
+ pf32,
44
+ pf64,
39
45
  swap,
40
46
  swap16,
41
47
  swap32,
@@ -75,12 +81,18 @@ __all__ = [
75
81
  "ctypes",
76
82
  "ctypes_type",
77
83
  "dumpstruct",
84
+ "f16",
85
+ "f32",
86
+ "f64",
78
87
  "hexdump",
79
88
  "p8",
80
89
  "p16",
81
90
  "p32",
82
91
  "p64",
83
92
  "pack",
93
+ "pf16",
94
+ "pf32",
95
+ "pf64",
84
96
  "swap",
85
97
  "swap16",
86
98
  "swap32",
@@ -11,6 +11,7 @@ from typing import TYPE_CHECKING
11
11
  from dissect.cstruct.bitbuffer import BitBuffer
12
12
  from dissect.cstruct.types import (
13
13
  Array,
14
+ BaseArray,
14
15
  Char,
15
16
  CharArray,
16
17
  Flag,
@@ -24,18 +25,15 @@ from dissect.cstruct.types import (
24
25
  Wchar,
25
26
  WcharArray,
26
27
  )
27
- from dissect.cstruct.types.base import BaseArray
28
28
  from dissect.cstruct.types.enum import EnumMetaType
29
- from dissect.cstruct.types.packed import _struct
29
+ from dissect.cstruct.util import _struct
30
30
 
31
31
  if TYPE_CHECKING:
32
32
  from collections.abc import Iterator
33
33
  from types import MethodType
34
34
 
35
35
  from dissect.cstruct.cstruct import cstruct
36
- from dissect.cstruct.types import (
37
- BaseType,
38
- )
36
+ from dissect.cstruct.types import BaseType
39
37
  from dissect.cstruct.types.structure import Field
40
38
 
41
39
  SUPPORTED_TYPES = (
@@ -6,6 +6,7 @@ from typing import TYPE_CHECKING, Any, BinaryIO, ClassVar, TypeVar
6
6
 
7
7
  from dissect.cstruct.exception import ArraySizeError
8
8
  from dissect.cstruct.expression import Expression
9
+ from dissect.cstruct.util import normalize_endianness
9
10
 
10
11
  if TYPE_CHECKING:
11
12
  from collections.abc import Callable
@@ -294,8 +295,10 @@ class BaseArray(BaseType):
294
295
  if cls.null_terminated:
295
296
  return cls.type._write_0(stream, data, endian=endian)
296
297
 
297
- if not cls.dynamic and cls.num_entries != (actual_size := len(data)):
298
- raise ArraySizeError(f"Expected static array size {cls.num_entries}, got {actual_size} instead.")
298
+ if not cls.dynamic and (remaining := cls.num_entries - (actual_size := len(data))):
299
+ if remaining < 0:
300
+ raise ArraySizeError(f"Expected static array size {cls.num_entries}, got {actual_size} instead.")
301
+ data = data + [cls.type.__default__()] * remaining
299
302
 
300
303
  return cls.type._write_array(stream, data, endian=endian)
301
304
 
@@ -326,27 +329,5 @@ def _is_eof(stream: BinaryIO) -> bool:
326
329
  return False
327
330
 
328
331
 
329
- ENDIANNESS_MAP: dict[AllowedEndianness, Endianness] = {
330
- "<": "<",
331
- ">": ">",
332
- "!": "!",
333
- "@": "@",
334
- "=": "=",
335
- "network": "!",
336
- "little": "<",
337
- "big": ">",
338
- }
339
-
340
-
341
- def normalize_endianness(endian: AllowedEndianness) -> Endianness:
342
- """Normalize an endianness string to one of the standard format characters."""
343
- try:
344
- return ENDIANNESS_MAP[endian]
345
- except KeyError:
346
- raise ValueError(
347
- f"Invalid endianness: {endian!r}, expected one of {', '.join(ENDIANNESS_MAP.keys())}"
348
- ) from None
349
-
350
-
351
332
  # As mentioned in the BaseType class, we correctly set the type here
352
333
  MetaType.ArrayType = Array
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  from typing import TYPE_CHECKING, Any, BinaryIO
4
4
 
5
+ from dissect.cstruct.exception import ArraySizeError
5
6
  from dissect.cstruct.types.base import EOF, BaseArray, BaseType
6
7
 
7
8
  if TYPE_CHECKING:
@@ -22,15 +23,20 @@ class CharArray(bytes, BaseArray):
22
23
  return type.__call__(cls, super()._read(stream, context=context, endian=endian))
23
24
 
24
25
  @classmethod
25
- def _write(cls, stream: BinaryIO, data: bytes, *, endian: Endianness) -> int:
26
- if isinstance(data, list) and data and isinstance(data[0], int):
26
+ def _write(cls, stream: BinaryIO, data: bytes | str | list[int], *, endian: Endianness) -> int:
27
+ if isinstance(data, list):
27
28
  data = bytes(data)
28
-
29
29
  elif isinstance(data, str):
30
30
  data = data.encode("latin-1")
31
31
 
32
32
  if cls.null_terminated:
33
- return stream.write(data + b"\x00")
33
+ data += b"\x00"
34
+
35
+ if not cls.dynamic and (remaining := cls.num_entries - (actual_size := len(data))):
36
+ if remaining < 0:
37
+ raise ArraySizeError(f"Expected static array size {cls.num_entries}, got {actual_size} instead.")
38
+ data += b"\x00" * remaining
39
+
34
40
  return stream.write(data)
35
41
 
36
42
 
@@ -1,10 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
- from functools import lru_cache
4
- from struct import Struct
5
3
  from typing import TYPE_CHECKING, Any, BinaryIO, Generic, TypeVar
6
4
 
7
5
  from dissect.cstruct.types.base import EOF, BaseType
6
+ from dissect.cstruct.util import _struct
8
7
 
9
8
  if TYPE_CHECKING:
10
9
  from typing_extensions import Self
@@ -12,11 +11,6 @@ if TYPE_CHECKING:
12
11
  from dissect.cstruct.cstruct import Endianness
13
12
 
14
13
 
15
- @lru_cache(1024)
16
- def _struct(endian: str, packchar: str) -> Struct:
17
- return Struct(f"{endian}{packchar}")
18
-
19
-
20
14
  T = TypeVar("T", int, float)
21
15
 
22
16
 
@@ -252,7 +252,7 @@ class StructureMetaType(MetaType):
252
252
  offset = stream.tell()
253
253
 
254
254
  if field.offset is not None and offset != struct_start + field.offset:
255
- # Field is at a specific offset, either alligned or added that way
255
+ # Field is at a specific offset, either aligned or added that way
256
256
  offset = struct_start + field.offset
257
257
  stream.seek(offset)
258
258
 
@@ -318,7 +318,7 @@ class StructureMetaType(MetaType):
318
318
  offset = stream.tell()
319
319
 
320
320
  if field.offset is not None and offset < struct_start + field.offset:
321
- # Field is at a specific offset, either alligned or added that way
321
+ # Field is at a specific offset, either aligned or added that way
322
322
  stream.write(b"\x00" * (struct_start + field.offset - offset))
323
323
  offset = struct_start + field.offset
324
324
 
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import sys
4
4
  from typing import TYPE_CHECKING, Any, BinaryIO, ClassVar
5
5
 
6
+ from dissect.cstruct.exception import ArraySizeError
6
7
  from dissect.cstruct.types.base import EOF, BaseArray, BaseType
7
8
 
8
9
  if TYPE_CHECKING:
@@ -26,6 +27,12 @@ class WcharArray(str, BaseArray):
26
27
  def _write(cls, stream: BinaryIO, data: str, *, endian: Endianness) -> int:
27
28
  if cls.null_terminated:
28
29
  data += "\x00"
30
+
31
+ if not cls.dynamic and (remaining := cls.num_entries - (actual_size := len(data))):
32
+ if remaining < 0:
33
+ raise ArraySizeError(f"Expected static array size {cls.num_entries}, got {actual_size} instead.")
34
+ data += "\x00" * remaining
35
+
29
36
  return stream.write(data.encode(Wchar.__encoding_map__[endian]))
30
37
 
31
38
 
dissect/cstruct/util.py CHANGED
@@ -3,15 +3,17 @@ from __future__ import annotations
3
3
  import os
4
4
  import pprint
5
5
  import string
6
+ import struct
6
7
  import sys
7
8
  from enum import Enum
9
+ from functools import lru_cache
8
10
  from typing import TYPE_CHECKING
9
11
 
10
12
  if TYPE_CHECKING:
11
13
  from collections.abc import Iterator
12
14
  from typing import Literal
13
15
 
14
- from dissect.cstruct.cstruct import AllowedEndianness
16
+ from dissect.cstruct.cstruct import AllowedEndianness, Endianness
15
17
  from dissect.cstruct.types.base import BaseType
16
18
  from dissect.cstruct.types.structure import Structure
17
19
 
@@ -64,6 +66,28 @@ ENDIANNESS_TO_BYTEORDER_MAP: dict[AllowedEndianness, Literal["big", "little"]] =
64
66
  "big": "big",
65
67
  }
66
68
 
69
+ ENDIANNESS_MAP: dict[AllowedEndianness, Endianness] = {
70
+ "<": "<",
71
+ ">": ">",
72
+ "!": "!",
73
+ "@": "@",
74
+ "=": "=",
75
+ "network": "!",
76
+ "little": "<",
77
+ "big": ">",
78
+ }
79
+
80
+
81
+ def normalize_endianness(endian: AllowedEndianness) -> Endianness:
82
+ """Normalize an endianness string to one of the standard format characters."""
83
+ try:
84
+ return ENDIANNESS_MAP[endian]
85
+ except KeyError:
86
+ raise ValueError(
87
+ f"Invalid endianness: {endian!r}, expected one of {', '.join(ENDIANNESS_MAP.keys())}"
88
+ ) from None
89
+
90
+
67
91
  Palette = list[tuple[int, str]]
68
92
 
69
93
 
@@ -327,6 +351,11 @@ def dumpstruct(
327
351
  return _dumpstruct(obj, obj.dumps(), offset, color, output, autoskip)
328
352
 
329
353
 
354
+ @lru_cache(1024)
355
+ def _struct(endian: str, packchar: str) -> struct.Struct:
356
+ return struct.Struct(f"{endian}{packchar}")
357
+
358
+
330
359
  def pack(value: int, size: int | None = None, endian: AllowedEndianness = "little") -> bytes:
331
360
  """Pack an integer value to a given bit size, endianness.
332
361
 
@@ -400,6 +429,36 @@ def p64(value: int, endian: AllowedEndianness = "little") -> bytes:
400
429
  return pack(value, 64, endian)
401
430
 
402
431
 
432
+ def pf16(value: float, endian: AllowedEndianness = "little") -> bytes:
433
+ """Pack a 16 bit float.
434
+
435
+ Arguments:
436
+ value: Value to pack.
437
+ endian: Endianness to use (little, big, network, <, >, !, @ or =).
438
+ """
439
+ return _struct(normalize_endianness(endian), "e").pack(value)
440
+
441
+
442
+ def pf32(value: float, endian: AllowedEndianness = "little") -> bytes:
443
+ """Pack a 32 bit float.
444
+
445
+ Arguments:
446
+ value: Value to pack.
447
+ endian: Endianness to use (little, big, network, <, >, !, @ or =).
448
+ """
449
+ return _struct(normalize_endianness(endian), "f").pack(value)
450
+
451
+
452
+ def pf64(value: float, endian: AllowedEndianness = "little") -> bytes:
453
+ """Pack a 64 bit float.
454
+
455
+ Arguments:
456
+ value: Value to pack.
457
+ endian: Endianness to use (little, big, network, <, >, !, @ or =).
458
+ """
459
+ return _struct(normalize_endianness(endian), "d").pack(value)
460
+
461
+
403
462
  def u8(value: bytes, endian: AllowedEndianness = "little", sign: bool = False) -> int:
404
463
  """Unpack an 8 bit integer.
405
464
 
@@ -444,6 +503,36 @@ def u64(value: bytes, endian: AllowedEndianness = "little", sign: bool = False)
444
503
  return unpack(value, 64, endian, sign)
445
504
 
446
505
 
506
+ def f16(value: bytes, endian: AllowedEndianness = "little") -> float:
507
+ """Unpack a 16 bit float.
508
+
509
+ Arguments:
510
+ value: Value to unpack.
511
+ endian: Endianness to use (little, big, network, <, >, !, @ or =).
512
+ """
513
+ return _struct(normalize_endianness(endian), "e").unpack(value)[0]
514
+
515
+
516
+ def f32(value: bytes, endian: AllowedEndianness = "little") -> float:
517
+ """Unpack a 32 bit float.
518
+
519
+ Arguments:
520
+ value: Value to unpack.
521
+ endian: Endianness to use (little, big, network, <, >, !, @ or =).
522
+ """
523
+ return _struct(normalize_endianness(endian), "f").unpack(value)[0]
524
+
525
+
526
+ def f64(value: bytes, endian: AllowedEndianness = "little") -> float:
527
+ """Unpack a 64 bit float.
528
+
529
+ Arguments:
530
+ value: Value to unpack.
531
+ endian: Endianness to use (little, big, network, <, >, !, @ or =).
532
+ """
533
+ return _struct(normalize_endianness(endian), "d").unpack(value)[0]
534
+
535
+
447
536
  def swap(value: int, size: int) -> int:
448
537
  """Swap the endianness of an integer with a given bit size.
449
538
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.cstruct
3
- Version: 5.0.dev6
3
+ Version: 5.0.dev8
4
4
  Summary: A Dissect module implementing a parser for C-like structures: structure parsing in Python made easy
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License-Expression: Apache-2.0
@@ -1,32 +1,32 @@
1
- dissect/cstruct/__init__.py,sha256=8VNVQfPH4aH5V_kD-jvtLPwQ-ag9ppKHTy3dbxIR6ik,1378
1
+ dissect/cstruct/__init__.py,sha256=KOyNeUvu4c0JaAiyOfj7iftGwUIjTmD8MwHtFsLPLSU,1504
2
2
  dissect/cstruct/bitbuffer.py,sha256=lZuLUOluHx4mzFGRp62_FO45_iJwXayyzv9-v8b0Q08,2687
3
- dissect/cstruct/compiler.py,sha256=vVg2H-pi9ugQ8Xvhs1JQ--4BjA5gtO2tW-1W8jr36V4,14283
3
+ dissect/cstruct/compiler.py,sha256=hlCNd7EQml8bJxI-fQB-kLS8CSdU3_YxzgIkxJbSJiU,14224
4
4
  dissect/cstruct/cstruct.py,sha256=bsCesSpbE0H4MUsHwb2iEbeadOBlOSAVENwyoP-UkP8,24929
5
5
  dissect/cstruct/exception.py,sha256=RqD08LuBkbMqa3iQ1A05DNN8XgEmQR_SUnguwe9LGo8,316
6
6
  dissect/cstruct/expression.py,sha256=MEwqHGgqA2fUk4kYk4lRLDWNTAMhB4-saJ5BgTxl7OA,7956
7
7
  dissect/cstruct/lexer.py,sha256=NDUfAWgyxgRNRuVO8ExXQ51LqQXS2mv9bywVa_M7tFQ,19665
8
8
  dissect/cstruct/parser.py,sha256=xCK-1O8c86sVFvjaXXSRgTsJWWd0ncKM6KJf2wbyGG8,21348
9
- dissect/cstruct/util.py,sha256=S__kLEb9HKZg_WZR4CGtXDxkIkERLKbzFTHoU8FT8tU,15313
9
+ dissect/cstruct/util.py,sha256=0khT6G1B7ZjNR7kjD9ox30jDaky8ZxxdUaN5FPMWQ_o,17845
10
10
  dissect/cstruct/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  dissect/cstruct/tools/stubgen.py,sha256=FLQieYE-MeKK31DcrDzwNUropUYHPjwdfcDb1X2L6j4,7651
12
12
  dissect/cstruct/types/__init__.py,sha256=6P71Pu94Dv7RNjZpDZ19pqzx-G0QzmQw4q0-3zWALso,911
13
- dissect/cstruct/types/base.py,sha256=TkU2a1TK1oDafz_9PTQfZuQT7g4aTRsKnG_-Q4jelsQ,12652
14
- dissect/cstruct/types/char.py,sha256=XAXlKZXbo88WJN-JPW4w4vzcuNgyvLl3Bpn8RLs9pVo,2707
13
+ dissect/cstruct/types/base.py,sha256=JRc5LpEOZwXQD0Wjo_Q_dWc6lEFtLTW1Q56SCGdDgj4,12268
14
+ dissect/cstruct/types/char.py,sha256=s4zDmnbuOjwHgcsnEihjSqgC6H3t1jsfBTYH2ykwvHU,2997
15
15
  dissect/cstruct/types/enum.py,sha256=YIWyP3H0tdxmuSI82enoULiN0YevpnU0UaY5ioBCYfI,8518
16
16
  dissect/cstruct/types/flag.py,sha256=7xxQjFEDPHSQOxBHgcc75WzPiAxflOquwr7Z7c3erLE,2347
17
17
  dissect/cstruct/types/int.py,sha256=Ewejng5pBYnQHPtzL5W0wQMJVUPYyrY8ALES8mFaabI,1324
18
18
  dissect/cstruct/types/leb128.py,sha256=V97XTJT_Xbw1LpTwTN1OkjPHuQQAQUxd8OGuA6yEDmE,2387
19
- dissect/cstruct/types/packed.py,sha256=78nQWm-yylgfK3858nN-XZhO5jiqyO-piGNEyPD2ps4,2458
19
+ dissect/cstruct/types/packed.py,sha256=NewM2M3CsQKHbByLL42sxaTTOFNoo8gC-dnYe_79qTg,2330
20
20
  dissect/cstruct/types/pointer.py,sha256=eGMrB_tTnKXKmYrcqyA_12IdukXcxRG3WOeQ1dgt7lk,3927
21
- dissect/cstruct/types/structure.py,sha256=_oMqkXtiF4PFHOh2eRXlkKo0Sb9T0CtrHZMvijJWtmM,37573
21
+ dissect/cstruct/types/structure.py,sha256=7pBg0moZbszeRomFEp5CbAHZcd1J8IVTmEG9Mo2eKS0,37571
22
22
  dissect/cstruct/types/void.py,sha256=LCYnTcxsFPaxln36QEUxWuCZVioHRRckMuqtlm6tH54,1218
23
- dissect/cstruct/types/wchar.py,sha256=YwYE2T-QYYjvO-5O83_VUlzPtrjX_w0bD9Q3rtsO7sM,2870
24
- dissect_cstruct-5.0.dev6.dist-info/licenses/COPYRIGHT,sha256=H-18RXfshdH9AdHwW2eO1Xa-5s6tY5eipHh5c0whDu4,316
25
- dissect_cstruct-5.0.dev6.dist-info/licenses/LICENSE,sha256=PhUqiw6jAh2KbBdVRPBq_hfAvfcTBin7nZ3CK7NQbTM,11341
26
- dissect_cstruct-5.0.dev6.dist-info/METADATA,sha256=i6LEcERc5fpAuARF_fyAa5tF6dDifNqK1ME9k8w7eLg,9255
27
- dissect_cstruct-5.0.dev6.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
28
- dissect_cstruct-5.0.dev6.dist-info/entry_points.txt,sha256=z53zqZqwD2OLrAkRwrP4wTeiU9CQe7xrMly0T2c0_wQ,71
29
- dissect_cstruct-5.0.dev6.dist-info/scm_file_list.json,sha256=qZZ_g1Xx93SzRIqQt_5slI4M_CHi3AeoUBF9uqiDfDQ,2306
30
- dissect_cstruct-5.0.dev6.dist-info/scm_version.json,sha256=fQVyKh0noL65fQHScjM0BBhoAJ2DxEOsu4SaVlpzeWs,162
31
- dissect_cstruct-5.0.dev6.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
32
- dissect_cstruct-5.0.dev6.dist-info/RECORD,,
23
+ dissect/cstruct/types/wchar.py,sha256=YCYlu91D9AMVpWOLbVMdpvDDURH-EqyppM5UMDU5UQw,3200
24
+ dissect_cstruct-5.0.dev8.dist-info/licenses/COPYRIGHT,sha256=H-18RXfshdH9AdHwW2eO1Xa-5s6tY5eipHh5c0whDu4,316
25
+ dissect_cstruct-5.0.dev8.dist-info/licenses/LICENSE,sha256=PhUqiw6jAh2KbBdVRPBq_hfAvfcTBin7nZ3CK7NQbTM,11341
26
+ dissect_cstruct-5.0.dev8.dist-info/METADATA,sha256=e7oamdNZkbBocBjcD_kkj0T-wSHGf5mPhSgWn-MWHos,9255
27
+ dissect_cstruct-5.0.dev8.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
28
+ dissect_cstruct-5.0.dev8.dist-info/entry_points.txt,sha256=z53zqZqwD2OLrAkRwrP4wTeiU9CQe7xrMly0T2c0_wQ,71
29
+ dissect_cstruct-5.0.dev8.dist-info/scm_file_list.json,sha256=nuFWhDGL6VmjcwOB94CSfjNBblnsa9imUy8X4BLyvhw,2306
30
+ dissect_cstruct-5.0.dev8.dist-info/scm_version.json,sha256=znogn9Q3i6GJ75IR8pSsX582lmewE1Hqievuy3IQk8U,162
31
+ dissect_cstruct-5.0.dev8.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
32
+ dissect_cstruct-5.0.dev8.dist-info/RECORD,,
@@ -1,78 +1,78 @@
1
1
  {
2
2
  "files": [
3
- "README.md",
4
- "tox.ini",
5
- "LICENSE",
6
- "pyproject.toml",
3
+ ".gitignore",
7
4
  "COPYRIGHT",
5
+ "README.md",
8
6
  "CHANGELOG.md",
9
7
  ".git-blame-ignore-revs",
8
+ "tox.ini",
10
9
  ".gitattributes",
10
+ "pyproject.toml",
11
11
  "MANIFEST.in",
12
- ".gitignore",
13
- "dissect/cstruct/cstruct.py",
14
- "dissect/cstruct/__init__.py",
12
+ "LICENSE",
13
+ ".github/pull_request_template.md",
14
+ ".github/workflows/dissect-ci.yml",
15
+ "dissect/cstruct/parser.py",
15
16
  "dissect/cstruct/compiler.py",
16
- "dissect/cstruct/expression.py",
17
17
  "dissect/cstruct/exception.py",
18
- "dissect/cstruct/parser.py",
19
- "dissect/cstruct/lexer.py",
20
- "dissect/cstruct/bitbuffer.py",
21
18
  "dissect/cstruct/util.py",
22
- "dissect/cstruct/types/int.py",
23
- "dissect/cstruct/types/__init__.py",
24
- "dissect/cstruct/types/leb128.py",
25
- "dissect/cstruct/types/flag.py",
26
- "dissect/cstruct/types/void.py",
27
- "dissect/cstruct/types/char.py",
19
+ "dissect/cstruct/cstruct.py",
20
+ "dissect/cstruct/bitbuffer.py",
21
+ "dissect/cstruct/lexer.py",
22
+ "dissect/cstruct/expression.py",
23
+ "dissect/cstruct/__init__.py",
24
+ "dissect/cstruct/types/base.py",
28
25
  "dissect/cstruct/types/pointer.py",
29
26
  "dissect/cstruct/types/structure.py",
27
+ "dissect/cstruct/types/void.py",
28
+ "dissect/cstruct/types/int.py",
29
+ "dissect/cstruct/types/flag.py",
30
+ "dissect/cstruct/types/packed.py",
30
31
  "dissect/cstruct/types/enum.py",
31
- "dissect/cstruct/types/base.py",
32
+ "dissect/cstruct/types/char.py",
32
33
  "dissect/cstruct/types/wchar.py",
33
- "dissect/cstruct/types/packed.py",
34
- "dissect/cstruct/tools/__init__.py",
34
+ "dissect/cstruct/types/leb128.py",
35
+ "dissect/cstruct/types/__init__.py",
35
36
  "dissect/cstruct/tools/stubgen.py",
36
- "tests/test_types_char.py",
37
- "tests/test_ctypes.py",
38
- "tests/test_types_custom.py",
39
- "tests/__init__.py",
40
- "tests/test_types_leb128.py",
41
- "tests/test_types_union.py",
42
- "tests/test_tools_stubgen.py",
43
- "tests/test_basic.py",
44
- "tests/test_lexer.py",
45
- "tests/test_types_int.py",
46
- "tests/test_expression.py",
47
- "tests/utils.py",
48
- "tests/test_align.py",
49
- "tests/test_utils.py",
50
- "tests/test_compiler.py",
37
+ "dissect/cstruct/tools/__init__.py",
38
+ "examples/secdesc.py",
39
+ "examples/pe.py",
40
+ "examples/mirai.py",
41
+ "examples/protobuf.py",
42
+ "examples/disk.py",
51
43
  "tests/test_types_enum.py",
44
+ "tests/test_types_pointer.py",
45
+ "tests/test_types_leb128.py",
46
+ "tests/test_annotations.py",
52
47
  "tests/test_types_wchar.py",
53
- "tests/test_bitfield.py",
54
- "tests/test_types_structure.py",
55
48
  "tests/test_parser.py",
56
- "tests/test_annotations.py",
49
+ "tests/test_ctypes.py",
50
+ "tests/test_bitbuffer.py",
57
51
  "tests/conftest.py",
58
- "tests/test_types_void.py",
52
+ "tests/test_types_packed.py",
53
+ "tests/test_types_structure.py",
54
+ "tests/test_types_union.py",
55
+ "tests/test_expression.py",
56
+ "tests/test_tools_stubgen.py",
57
+ "tests/test_types_custom.py",
58
+ "tests/utils.py",
59
+ "tests/test_lexer.py",
59
60
  "tests/test_types_flag.py",
60
61
  "tests/test_benchmark.py",
61
- "tests/test_types_pointer.py",
62
- "tests/test_types_packed.py",
62
+ "tests/test_types_char.py",
63
+ "tests/test_compiler.py",
64
+ "tests/test_types_int.py",
65
+ "tests/test_types_void.py",
63
66
  "tests/test_types_base.py",
64
- "tests/test_bitbuffer.py",
65
- "tests/_data/testdef.txt",
66
- "tests/_docs/__init__.py",
67
+ "tests/test_align.py",
68
+ "tests/test_basic.py",
69
+ "tests/test_bitfield.py",
70
+ "tests/test_utils.py",
71
+ "tests/__init__.py",
72
+ "tests/_docs/conf.py",
67
73
  "tests/_docs/Makefile",
68
74
  "tests/_docs/index.rst",
69
- "tests/_docs/conf.py",
70
- "examples/secdesc.py",
71
- "examples/disk.py",
72
- "examples/pe.py",
73
- "examples/mirai.py",
74
- "examples/protobuf.py",
75
- ".github/pull_request_template.md",
76
- ".github/workflows/dissect-ci.yml"
75
+ "tests/_docs/__init__.py",
76
+ "tests/_data/testdef.txt"
77
77
  ]
78
78
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "5.0.dev0",
3
+ "distance": 8,
4
+ "node": "g3032ad71f5e15148222c2faef49e47112a36bf12",
5
+ "dirty": true,
6
+ "branch": "main",
7
+ "node_date": "2026-07-20"
8
+ }
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "5.0.dev0",
3
- "distance": 6,
4
- "node": "g8fd15061a9f9618417a62277bc6f2d625768fdd2",
5
- "dirty": true,
6
- "branch": "main",
7
- "node_date": "2026-07-16"
8
- }