Skip to content

Feature request: Support compressed format e.g. ".posez" or ".pose.zst" #162

@cleong110

Description

@cleong110

Inspired by ".npy" and ".npz", I think it would be nice to support a ".posez" format. I have found thus far that using zstd adds almost no time overhead to decompress, and reduces hard drive space requirements by a good chunk, up to 50% in some cases.

I can load the files with:

from pyzstd import decompress
# file_path is a path to .pose.zst
Pose.read(decompress(file_path.read_bytes()))

This causes two issues I have noticed:

  1. Code relying on the .pose extension is complicated by having the double extension (".pose.zst"). For example ".stem" doesn't work right, taking in ".foo.pose.zst" and giving you "foo.pose" instead of the desired "foo".
  2. If you try reading in BOTH a .pose and an .pose.zst in the same session, you get "RuntimeError: PoseHeaderCache hash does not match buffer hash"

I have tried some workarounds, but I think native support of a ".posez" format would be cleaner.

Related to #34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions