wavpack-numcodecs 0.1.4__tar.gz → 0.2.0__tar.gz

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.
Files changed (41) hide show
  1. {wavpack_numcodecs-0.1.4/wavpack_numcodecs.egg-info → wavpack-numcodecs-0.2.0}/PKG-INFO +32 -6
  2. wavpack-numcodecs-0.2.0/README.md +76 -0
  3. wavpack-numcodecs-0.2.0/pyproject.toml +46 -0
  4. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0}/setup.py +29 -44
  5. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/__init__.py +3 -1
  6. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/include/wavpack/wavpack.h +5 -3
  7. wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libraries/5.7.0/linux-x86_64/libwavpack.so +0 -0
  8. wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libraries/5.7.0/linux-x86_64/libwavpack.so.1 +0 -0
  9. wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libraries/5.7.0/windows-x86_32/wavpackdll.dll +0 -0
  10. wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libraries/5.7.0/windows-x86_64/wavpackdll.dll +0 -0
  11. wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libwavpack.so.1 +0 -0
  12. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/wavpack.c +352 -380
  13. wavpack-numcodecs-0.2.0/src/wavpack_numcodecs.egg-info/PKG-INFO +90 -0
  14. wavpack-numcodecs-0.2.0/src/wavpack_numcodecs.egg-info/SOURCES.txt +32 -0
  15. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs.egg-info/entry_points.txt +0 -1
  16. wavpack-numcodecs-0.2.0/tests/test_imports.py +39 -0
  17. wavpack-numcodecs-0.2.0/tests/test_wavpack_codec.py +211 -0
  18. wavpack_numcodecs-0.1.4/PKG-INFO +0 -64
  19. wavpack_numcodecs-0.1.4/README.md +0 -48
  20. wavpack_numcodecs-0.1.4/wavpack_numcodecs/libraries/linux-x86_64/libwavpack.so.1 +0 -0
  21. wavpack_numcodecs-0.1.4/wavpack_numcodecs/libraries/windows-x86_32/wavpackdll.lib +0 -0
  22. wavpack_numcodecs-0.1.4/wavpack_numcodecs/libraries/windows-x86_64/wavpackdll.lib +0 -0
  23. wavpack_numcodecs-0.1.4/wavpack_numcodecs/version.py +0 -1
  24. wavpack_numcodecs-0.1.4/wavpack_numcodecs.egg-info/SOURCES.txt +0 -28
  25. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0}/LICENSE +0 -0
  26. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0}/MANIFEST.in +0 -0
  27. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0}/requirements.txt +0 -0
  28. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0}/setup.cfg +0 -0
  29. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/compat_ext.c +0 -0
  30. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/compat_ext.pxd +0 -0
  31. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/compat_ext.pyx +0 -0
  32. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/globals.py +0 -0
  33. {wavpack_numcodecs-0.1.4/wavpack_numcodecs/libraries → wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libraries/5.6.0}/linux-x86_64/libwavpack.so +0 -0
  34. {wavpack_numcodecs-0.1.4/wavpack_numcodecs/libraries → wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libraries/5.6.0}/windows-x86_32/wavpackdll.dll +0 -0
  35. {wavpack_numcodecs-0.1.4/wavpack_numcodecs/libraries → wavpack-numcodecs-0.2.0/src/wavpack_numcodecs/libraries/5.6.0}/windows-x86_64/wavpackdll.dll +0 -0
  36. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/src/decoder.c +0 -0
  37. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/src/encoder.c +0 -0
  38. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs/wavpack.pyx +0 -0
  39. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs.egg-info/dependency_links.txt +0 -0
  40. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs.egg-info/requires.txt +0 -0
  41. {wavpack_numcodecs-0.1.4 → wavpack-numcodecs-0.2.0/src}/wavpack_numcodecs.egg-info/top_level.txt +0 -0
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wavpack-numcodecs
3
- Version: 0.1.4
3
+ Version: 0.2.0
4
4
  Summary: Numcodecs implementation of WavPack audio codec.
5
- Home-page: https://github.com/AllenNeuralDynamics/wavpack-numcodecs
6
- Author: Alessio Buccino, David Bryant
7
- Author-email: alessiop.buccino@gmail.com
8
- License: UNKNOWN
9
- Platform: UNKNOWN
5
+ Author-email: Alessio Buccino <alessiop.buccino@gmail.com>, David Bryant <david@wavpack.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/AllenNeuralDynamics/wavpack-numcodecs
8
+ Keywords: example,project
10
9
  Classifier: Programming Language :: Python :: 3
11
10
  Classifier: License :: OSI Approved :: MIT License
12
11
  Classifier: Operating System :: OS Independent
@@ -24,6 +23,20 @@ License-File: LICENSE
24
23
  This implementation enables one to use WavPack as a compressor in
25
24
  [Zarr](https://zarr.readthedocs.io/en/stable/index.html).
26
25
 
26
+
27
+ ### Requirements
28
+
29
+ To install `wavpack-numcodecs` on MacOS, you need to install `wavpack` with `brew`:
30
+
31
+ ```bash
32
+ brew install wavpack
33
+ ```
34
+
35
+ For Linux and Windows, the package comes with pre-built binaries of the most
36
+ [recent version Wavpack version](https://github.com/dbry/WavPack/releases/tag/5.7.0).
37
+
38
+ On Linux, if an existing `wavpack` installation is found, the package will use it. Otherwise, it will use the pre-built binaries available in the `wavpack_numcodecs/libraries` folder.
39
+
27
40
  ## Installation
28
41
 
29
42
  Install via `pip`:
@@ -62,3 +75,16 @@ Available `**kwargs` can be browsed with: `WavPack?`
62
75
  In order to reload in zarr an array saved with the `WavPack`, you just need to have the `wavpack_numcodecs` package
63
76
  installed.
64
77
 
78
+ # Developmers guide
79
+
80
+ ## How to upgrade WavPack installation
81
+
82
+ To upgrade the WavPack installation, you need to:
83
+
84
+ 1. Download the latest version of WavPack from the [official website](https://www.wavpack.com/downloads.html).
85
+ 2. Extract the content of the downloaded file.
86
+ 3. Create a new folder in the `src/wavpack_numcodecs/libraries` folder with the name of the version of the WavPack you are installing.
87
+ 4. Add the Windows .dll and .lib files to the `windows-x86_32` and `windows-x86_64` folders, respectievely.
88
+ 5. Build the Linux shared library and copy the `.so` file to the `linux-x86_64` folder.
89
+ 6. Set the `LATET_WAVPACK_VERSION` variable in the `setup.py` to match the version of the WavPack you are installing.
90
+ 7. Update the version of the CI workflows in the `.github/workflows/` folder.
@@ -0,0 +1,76 @@
1
+ [![PyPI version](https://badge.fury.io/py/wavpack-numcodecs.svg)](https://badge.fury.io/py/wavpack-numcodecs) ![tests](https://github.com/AllenNeuralDynamics/wavpack-numcodecs/actions/workflows/python-package-cython.yml/badge.svg)
2
+
3
+
4
+ # WavPack - numcodecs implementation
5
+
6
+ [Numcodecs](https://numcodecs.readthedocs.io/en/latest/index.html) wrapper to the
7
+ [WavPack](https://www.wavpack.com/index.html) audio codec.
8
+
9
+ This implementation enables one to use WavPack as a compressor in
10
+ [Zarr](https://zarr.readthedocs.io/en/stable/index.html).
11
+
12
+
13
+ ### Requirements
14
+
15
+ To install `wavpack-numcodecs` on MacOS, you need to install `wavpack` with `brew`:
16
+
17
+ ```bash
18
+ brew install wavpack
19
+ ```
20
+
21
+ For Linux and Windows, the package comes with pre-built binaries of the most
22
+ [recent version Wavpack version](https://github.com/dbry/WavPack/releases/tag/5.7.0).
23
+
24
+ On Linux, if an existing `wavpack` installation is found, the package will use it. Otherwise, it will use the pre-built binaries available in the `wavpack_numcodecs/libraries` folder.
25
+
26
+ ## Installation
27
+
28
+ Install via `pip`:
29
+
30
+ ```
31
+ pip install wavpack-numcodecs
32
+ ```
33
+
34
+ Or from sources:
35
+
36
+ ```
37
+ git clone https://github.com/AllenNeuralDynamics/wavpack-numcodecs.git
38
+ cd wavpack_numcodecs
39
+ pip install .
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ This is a simple example on how to use the `WavPackCodec` with `zarr`:
45
+
46
+ ```
47
+ from wavpack_numcodecs import WavPack
48
+
49
+ data = ... # any numpy array
50
+
51
+ # instantiate WavPack compressor
52
+ wv_compressor = WavPack(level=2, bps=None)
53
+
54
+ z = zarr.array(data, compressor=wv_compressor)
55
+
56
+ data_read = z[:]
57
+ ```
58
+ Available `**kwargs` can be browsed with: `WavPack?`
59
+
60
+ **NOTE:**
61
+ In order to reload in zarr an array saved with the `WavPack`, you just need to have the `wavpack_numcodecs` package
62
+ installed.
63
+
64
+ # Developmers guide
65
+
66
+ ## How to upgrade WavPack installation
67
+
68
+ To upgrade the WavPack installation, you need to:
69
+
70
+ 1. Download the latest version of WavPack from the [official website](https://www.wavpack.com/downloads.html).
71
+ 2. Extract the content of the downloaded file.
72
+ 3. Create a new folder in the `src/wavpack_numcodecs/libraries` folder with the name of the version of the WavPack you are installing.
73
+ 4. Add the Windows .dll and .lib files to the `windows-x86_32` and `windows-x86_64` folders, respectievely.
74
+ 5. Build the Linux shared library and copy the `.so` file to the `linux-x86_64` folder.
75
+ 6. Set the `LATET_WAVPACK_VERSION` variable in the `setup.py` to match the version of the WavPack you are installing.
76
+ 7. Update the version of the CI workflows in the `.github/workflows/` folder.
@@ -0,0 +1,46 @@
1
+ [project]
2
+ name = "wavpack-numcodecs"
3
+ version = "0.2.0"
4
+ description = "Numcodecs implementation of WavPack audio codec."
5
+ authors = [
6
+ {name = "Alessio Buccino", email = "alessiop.buccino@gmail.com"},
7
+ {name = "David Bryant", email = "david@wavpack.com"},
8
+ ]
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ keywords = ["example", "project"]
12
+ classifiers = [
13
+ "Programming Language :: Python :: 3",
14
+ "License :: OSI Approved :: MIT License",
15
+ "Operating System :: OS Independent",
16
+ ]
17
+ dependencies = [
18
+ "numpy",
19
+ "numcodecs",
20
+ "packaging"
21
+ ]
22
+
23
+ [project.urls]
24
+ "Homepage" = "https://github.com/AllenNeuralDynamics/wavpack-numcodecs"
25
+
26
+
27
+
28
+ [build-system]
29
+ requires = ["setuptools>=62.0"]
30
+ build-backend = "setuptools.build_meta"
31
+
32
+ [tool.setuptools]
33
+ include-package-data = true
34
+ package-data = {"wavpack_numcodecs" = ["**/*.pyx", "**/*.pxd", "**/*.c", "**/*.h", "**/*.so", "**/*.so.*", "**/*.dll"]}
35
+
36
+ [tool.setuptools.exclude-package-data]
37
+ wavpack_numcodecs = ["**/tests/test_*"]
38
+
39
+ [tool.setuptools.packages.find]
40
+ where = ["src"]
41
+ include = ["wavpack_numcodecs*"]
42
+ namespaces = false
43
+ exclude = ["wavpack_numcodecs.*.tests"]
44
+
45
+ [tool.black]
46
+ line-length = 120
@@ -1,10 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  import platform
3
3
  import shutil
4
+ import os
4
5
  from pathlib import Path
5
6
  from subprocess import check_output
6
7
 
7
- from setuptools import Extension, find_packages, setup
8
+ from setuptools import Extension, setup
8
9
 
9
10
  try:
10
11
  from Cython.Build import cythonize
@@ -14,16 +15,12 @@ except ImportError:
14
15
  else:
15
16
  have_cython = True
16
17
 
17
-
18
- def open_requirements(fname):
19
- with open(fname, mode="r") as f:
20
- requires = f.read().split("\n")
21
- requires = [e for e in requires if len(e) > 0 and not e.startswith("#")]
22
- return requires
18
+ LATEST_WAVPACK_VERSION = "5.7.0"
19
+ SRC_FOLDER = "src/wavpack_numcodecs"
23
20
 
24
21
 
25
22
  def get_build_extensions():
26
- include_dirs = ["wavpack_numcodecs/include"]
23
+ include_dirs = [f"{SRC_FOLDER}/include"]
27
24
  runtime_library_dirs = []
28
25
  extra_link_args = []
29
26
 
@@ -31,43 +28,53 @@ def get_build_extensions():
31
28
  libraries = ["wavpack"]
32
29
  if shutil.which("wavpack") is not None:
33
30
  out = check_output(["wavpack", "--version"])
34
- print(f"wavpack is installed!\n{out.decode()}")
31
+ print(f"WavPack is installed!\n{out.decode()}")
35
32
  extra_link_args = ["-L/usr/local/lib/", "-L/usr/bin/"]
36
33
  runtime_library_dirs = ["/usr/local/lib/", "/usr/bin/"]
37
34
  else:
38
35
  print("Using shipped libraries")
39
- extra_link_args = [f"-Lwavpack_numcodecs/libraries/linux-x86_64"]
40
- runtime_library_dirs = ["$ORIGIN/libraries/linux-x86_64"]
36
+ extra_link_args = [f"-L{SRC_FOLDER}/libraries/{LATEST_WAVPACK_VERSION}/linux-x86_64"]
37
+ runtime_library_dirs = [
38
+ "$ORIGIN/libraries/{LATEST_WAVPACK_VERSION}/linux-x86_64",
39
+ f"{SRC_FOLDER}/libraries/{LATEST_WAVPACK_VERSION}/linux-x86_64"
40
+ ]
41
41
  # hack
42
42
  shutil.copy(
43
- "wavpack_numcodecs/libraries/linux-x86_64/libwavpack.so",
44
- "wavpack_numcodecs/libraries/linux-x86_64/libwavpack.so.1",
43
+ f"{SRC_FOLDER}/libraries/{LATEST_WAVPACK_VERSION}/linux-x86_64/libwavpack.so",
44
+ f"{SRC_FOLDER}/libraries/{LATEST_WAVPACK_VERSION}/linux-x86_64/libwavpack.so.1",
45
45
  )
46
46
  elif platform.system() == "Darwin":
47
47
  libraries = ["wavpack"]
48
48
  assert shutil.which("wavpack") is not None, (
49
- "wavpack need to be installed externally. " "You can use: brew install wavpack"
49
+ f"WavPack needs to be installed externally for MacOS platforms.\n"
50
+ f"You can use homebrew: \n\t >>> brew install wavpack\nor compile it from source:"
51
+ f"\n\t >>> wget https://www.wavpack.com/wavpack-{LATEST_WAVPACK_VERSION}.tar.bz2"
52
+ f"\n\t >>> tar -xf wavpack-{LATEST_WAVPACK_VERSION}.tar.bz2"
53
+ f"\n\t >>> cd wavpack-{LATEST_WAVPACK_VERSION}\n\t >>> ./configure\n\t >>> sudo make install\n\t >>> cd .."
50
54
  )
51
55
  print("wavpack is installed!")
52
56
  extra_link_args = ["-L~/include/", "-L/usr/local/include/", "-L/usr/include"]
57
+ runtime_library_dirs = ["/opt/homebrew/lib/", "/opt/homebrew/Cellar"]
58
+ for rt_dir in runtime_library_dirs:
59
+ extra_link_args.append(f"-L{rt_dir}")
53
60
  else: # windows
54
61
  libraries = ["wavpackdll"]
55
62
  # add library folder to PATH and copy .dll in the src
56
63
  if "64" in platform.architecture()[0]:
57
- lib_path = "wavpack_numcodecs/libraries/windows-x86_64"
64
+ lib_path = f"{SRC_FOLDER}/libraries/{LATEST_WAVPACK_VERSION}/windows-x86_64"
58
65
  else:
59
- lib_path = "wavpack_numcodecs/libraries/windows-x86_32"
66
+ lib_path = f"{SRC_FOLDER}/libraries/{LATEST_WAVPACK_VERSION}/windows-x86_32"
60
67
  extra_link_args = [f"/LIBPATH:{lib_path}"]
61
68
  for libfile in Path(lib_path).iterdir():
62
- shutil.copy(libfile, "wavpack_numcodecs")
69
+ shutil.copy(libfile, SRC_FOLDER)
63
70
 
64
71
  if have_cython:
65
72
  print("Building with Cython")
66
- sources_compat_ext = ["wavpack_numcodecs/compat_ext.pyx"]
67
- sources_wavpack_ext = ["wavpack_numcodecs/wavpack.pyx"]
73
+ sources_compat_ext = [f"{SRC_FOLDER}/compat_ext.pyx"]
74
+ sources_wavpack_ext = [f"{SRC_FOLDER}/wavpack.pyx"]
68
75
  else:
69
- sources_compat_ext = ["wavpack_numcodecs/compat_ext.c"]
70
- sources_wavpack_ext = ["wavpack_numcodecs/wavpack.c"]
76
+ sources_compat_ext = [f"{SRC_FOLDER}/compat_ext.c"]
77
+ sources_wavpack_ext = [f"{SRC_FOLDER}/wavpack.c"]
71
78
 
72
79
  extensions = [
73
80
  Extension("wavpack_numcodecs.compat_ext", sources=sources_compat_ext, extra_compile_args=[]),
@@ -87,34 +94,12 @@ def get_build_extensions():
87
94
  return extensions
88
95
 
89
96
 
90
- d = {}
91
- exec(open("wavpack_numcodecs/version.py").read(), None, d)
92
- version = d["version"]
93
- long_description = open("README.md").read()
94
-
95
- install_requires = open_requirements("requirements.txt")
96
97
  entry_points = {"numcodecs.codecs": ["wavpack = wavpack_numcodecs:WavPack"]}
97
98
  extensions = get_build_extensions()
98
99
  cmdclass = {"build_ext": build_ext} if have_cython else {}
99
100
 
100
101
  setup(
101
- name="wavpack_numcodecs",
102
- version=version,
103
- author="Alessio Buccino, David Bryant",
104
- author_email="alessiop.buccino@gmail.com",
105
- description="Numcodecs implementation of WavPack audio codec.",
106
- long_description=long_description,
107
- long_description_content_type="text/markdown",
108
- url="https://github.com/AllenNeuralDynamics/wavpack-numcodecs",
109
- install_requires=install_requires,
110
- classifiers=[
111
- "Programming Language :: Python :: 3",
112
- "License :: OSI Approved :: MIT License",
113
- "Operating System :: OS Independent",
114
- ],
115
- packages=find_packages(),
116
102
  ext_modules=extensions,
117
- entry_points=entry_points,
118
103
  cmdclass=cmdclass,
119
- include_package_data=True,
104
+ entry_points=entry_points,
120
105
  )
@@ -8,4 +8,6 @@ from .globals import (
8
8
  set_num_decoding_threads,
9
9
  set_num_encoding_threads,
10
10
  )
11
- from .version import version as __version__
11
+ import importlib.metadata
12
+
13
+ __version__ = importlib.metadata.version("wavpack_numcodecs")
@@ -1,7 +1,7 @@
1
1
  ////////////////////////////////////////////////////////////////////////////
2
2
  // **** WAVPACK **** //
3
3
  // Hybrid Lossless Wavefile Compressor //
4
- // Copyright (c) 1998 - 2022 David Bryant. //
4
+ // Copyright (c) 1998 - 2024 David Bryant. //
5
5
  // All Rights Reserved. //
6
6
  // Distributed under the BSD Software License (see license.txt) //
7
7
  ////////////////////////////////////////////////////////////////////////////
@@ -189,6 +189,7 @@ typedef struct {
189
189
  #define ID_ALT_MD5_CHECKSUM (ID_OPTIONAL_DATA | 0x9)
190
190
  #define ID_NEW_CONFIG_BLOCK (ID_OPTIONAL_DATA | 0xa)
191
191
  #define ID_CHANNEL_IDENTITIES (ID_OPTIONAL_DATA | 0xb)
192
+ #define ID_WVX_NEW_BITSTREAM (ID_OPTIONAL_DATA | ID_WVX_BITSTREAM)
192
193
  #define ID_BLOCK_CHECKSUM (ID_OPTIONAL_DATA | 0xf)
193
194
 
194
195
  ///////////////////////// WavPack Configuration ///////////////////////////////
@@ -228,6 +229,7 @@ typedef struct {
228
229
  #define CONFIG_MD5_CHECKSUM 0x8000000 // store MD5 signature
229
230
  #define CONFIG_MERGE_BLOCKS 0x10000000 // merge blocks of equal redundancy (for lossyWAV)
230
231
  #define CONFIG_PAIR_UNDEF_CHANS 0x20000000 // encode undefined channels in stereo pairs
232
+ #define CONFIG_OPTIMIZE_32BIT 0x40000000 // new optimizations for 32-bit integer files
231
233
  #define CONFIG_OPTIMIZE_MONO 0x80000000 // optimize for mono streams posing as stereo
232
234
 
233
235
  // The lower 8 bits of qmode indicate the use of new features in version 5 that (presently)
@@ -330,8 +332,8 @@ WavpackContext *WavpackOpenFileInput (const char *infilename, char *error, int f
330
332
 
331
333
  // new for multithreaded
332
334
 
333
- #define OPEN_THREADS_SHFT 12 // specify number of worker threads here for multichannel file
334
- #define OPEN_THREADS_MASK 0xF000 // decode; 0 to disable, otherwise 2-15 (1 is useless)
335
+ #define OPEN_THREADS_SHFT 12 // specify number of additional worker threads here for
336
+ #define OPEN_THREADS_MASK 0xF000 // decode; 0 to disable, otherwise 1-15 added threads
335
337
 
336
338
  int WavpackGetMode (WavpackContext *wpc);
337
339