{"id":23358,"library":"binary2strings","title":"binary2strings","description":"A Python library for fast extraction of ASCII, UTF-8, and UTF-16 strings from binary buffers, using a C backend for performance. Current version: 0.1.13. Release cadence: irregular.","status":"active","version":"0.1.13","language":"python","source_language":"en","source_url":"https://github.com/glmcdona/binary2strings","tags":["binary","strings","extraction","C-extension","forensics"],"install":[{"cmd":"pip install binary2strings","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Required for numpy array input support","package":"numpy","optional":true}],"imports":[{"note":"extract_all_strings does not exist; use extract_ascii_strings or other specific extractors","wrong":"from binary2strings import extract_all_strings","symbol":"extract_ascii_strings","correct":"from binary2strings import extract_ascii_strings"},{"note":"Correct import for UTF-16 strings","symbol":"extract_unicode_strings","correct":"from binary2strings import extract_unicode_strings"},{"note":"extract_all_strings is a function in the module namespace; call binary2strings.extract_all_strings()","wrong":"import binary2strings","symbol":"extract_all_strings"}],"quickstart":{"code":"import binary2strings\n\ndata = b'Hello\\x00World'\nresult = binary2strings.extract_all_strings(data)\nprint(result)\n# Output: [('Hello', 0, 'UTF-16LE'), ('World', 6, 'UTF-16LE')]","lang":"python","description":"Extract all strings (ASCII and Unicode) from a bytes object."},"warnings":[{"fix":"Use the encoding string only for informational purposes or map it manually to a standard codec.","message":"The library returns strings along with their byte offset and encoding type. The encoding field is a string like 'ASCII' or 'UTF-16LE', not a Python codec name. Do not pass it directly to str.encode().","severity":"gotcha","affected_versions":"all"},{"fix":"Use binary2strings.extract_all_strings(data, min_bytes=4, ascii_only=True) to replicate ASCII-only extraction.","message":"extract_ascii_strings and extract_unicode_strings may be deprecated in future; use extract_all_strings with the min_bytes and encoding filter parameters instead.","severity":"deprecated","affected_versions":"0.1.x"},{"fix":"Pass min_bytes=2 or lower to extract shorter strings.","message":"The minimum string length parameter (min_bytes) defaults to 4. Short strings like 'AB' are ignored unless you set min_bytes=2.","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":"Run 'pip install binary2strings' and ensure you are using the correct Python interpreter.","cause":"Library not installed or installed in a different Python environment.","error":"ModuleNotFoundError: No module named 'binary2strings'"},{"fix":"Use 'from binary2strings import extract_ascii_strings' or call 'binary2strings.extract_all_strings()' without importing the function name.","cause":"Attempting a direct import that doesn't match the module structure.","error":"ImportError: cannot import name 'extract_all_strings' from 'binary2strings'"},{"fix":"Call 'binary2strings.extract_all_strings(data)' where data is a bytes, bytearray, or numpy array.","cause":"Forgetting to pass the bytes-like object or passing it as a keyword argument incorrectly.","error":"binary2strings.extract_all_strings() missing 1 required positional argument: 'data'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}