CustomTarget: buffer unseekable targets to memory

Đang mở
#5,342 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
backend

Hướng nghiên cứu

Start in jxlsave.c at the code that writes chunks to the VipsTarget and calls vips_target_seek(), and at the no-op set_finalized_position callback. Read how VipsTarget reports seekability before changing anything. Done would mean a JXL save to a non-seekable target, such as a pipe, produces the same bytes as a seekable one, with the bytes held until the finalized position advances. The maintainers have not yet agreed on a design, so confirm the approach in the thread first.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Hi! I had a quick look at jxlsave.c, and it seems to write chunks to VipsTarget as they are released, and seeks using vips_target_seek(). The set_finalized_position callback is a no-op. This seems to make jxlsave_target a little bit awkward for non-seekable targets, such as pipes and http streams, since bytes emitted may be changed later.

Would it be feasible to have jxlsave.c support non-seekable targets by staging bytes internally, only flushing bytes up to the finalized position as it advances?

Originally posted by @hlindset in https://github.com/libvips/libvips/discussions/2055#discussioncomment-17470870

Ngôn ngữ chính
C
Star
11.9k
Fork
811
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
44

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của libvips/libvips

Tất cả issue của libvips/libvips

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.