{"id":24217,"library":"pcodec","title":"pcodec","description":"Good compression for numerical sequences. Current version 1.0.1, released periodically.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/pcodec/pcodec","tags":["compression","numpy","numerical-sequences"],"install":[{"cmd":"pip install pcodec","lang":"bash","label":"Install pcodec"}],"dependencies":[],"imports":[{"note":"Correct import path.","symbol":"compress","correct":"from pcodec import compress"},{"note":"Correct import path.","symbol":"decompress","correct":"from pcodec import decompress"}],"quickstart":{"code":"from pcodec import compress, decompress\nimport numpy as np\n\ndata = np.array([1.0, 2.5, 3.2, 4.8, 5.1], dtype=np.float64)\ncompressed = compress(data)\ndecompressed = decompress(compressed, dtype=np.float64)\nprint(decompressed)","lang":"python","description":"Compress and decompress a numpy array of float64."},"warnings":[{"fix":"Update calls: compress(src=...) and use delta_encoding='no_op' instead of 'none'.","message":"In v1.0.0, function arguments were renamed: 'nums' became 'src', and 'none' delta encoding became 'no_op'.","severity":"breaking","affected_versions":">=1.0.0,<1.0.0"},{"fix":"Check pcodec documentation for current function signatures.","message":"In v1.0.0, simple_compress_into now accepts any Write impl (Rust change); Python API may have changed signature.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Convert your data to a numpy array with the correct dtype before calling compress.","message":"Compression and decompression require numpy arrays; other iterables may not work.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure pcodec >= 1.0.0 is installed: pip install --upgrade pcodec","cause":"Older versions of pcodec had different public API or the module is not installed correctly.","error":"ImportError: cannot import name 'compress' from 'pcodec'"},{"fix":"Use compress(src=your_array) instead of compress(nums=your_array).","cause":"In v1.0.0, 'nums' argument was renamed to 'src'.","error":"TypeError: compress() got an unexpected keyword argument 'nums'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}