Commit f76cbfd
Make SubReadStream seekable when underlying stream is seekable (dotnet#118720)
* Initial plan
* Implement seekable SubReadStream when underlying stream is seekable
Co-authored-by: rzikm <[email protected]>
* Fix bounds checking in SubReadStream.Seek and add test for reading entry content twice
Co-authored-by: rzikm <[email protected]>
* Address PR feedback: fix bounds checking, use localized strings, refactor test
Co-authored-by: rzikm <[email protected]>
* Fix ReadStreamSeekOps test to allow seeking beyond end of stream
Co-authored-by: rzikm <[email protected]>
* Add braces to if statements per .editorconfig requirement
Co-authored-by: rzikm <[email protected]>
* Update ReadStreamOps test to check compression method instead of using size heuristic
Co-authored-by: alinpahontu2912 <[email protected]>
* Update ReadStreamOps test to dynamically check CanSeek property and test seeking behavior accordingly
Co-authored-by: alinpahontu2912 <[email protected]>
* Fix SubReadStream seek operations to have immediate observable effects
Co-authored-by: alinpahontu2912 <[email protected]>
* Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
* Revert immediate observable effects from SubReadStream seek operations
Co-authored-by: alinpahontu2912 <[email protected]>
* Revert dfd29b2 changes and restore e525dfb immediate observable effects
- Reverted the problematic helper method from dfd29b2 that replaced reflection in tests
- Restored the e525dfb changes that make SubReadStream seek operations have immediate observable effects
- Position setter and Seek method now call _superStream.Seek() immediately rather than deferring
- All 1335 tests pass
Co-authored-by: alinpahontu2912 <[email protected]>
* Honor return value of Seek and use Position setter in Position property
Co-authored-by: alinpahontu2912 <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: rzikm <[email protected]>
Co-authored-by: alinpahontu2912 <[email protected]>
Co-authored-by: Copilot <[email protected]>1 parent 50c03e2 commit f76cbfd
File tree
4 files changed
+272
-8
lines changed- src/libraries
- System.IO.Compression.ZipFile/tests
- System.IO.Compression
- src
- Resources
- System/IO/Compression
- tests/ZipArchive
4 files changed
+272
-8
lines changedLines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
297 | 324 | | |
298 | 325 | | |
299 | 326 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
299 | 302 | | |
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
263 | 272 | | |
264 | 273 | | |
265 | 274 | | |
266 | 275 | | |
267 | 276 | | |
268 | | - | |
| 277 | + | |
269 | 278 | | |
270 | 279 | | |
271 | 280 | | |
| |||
366 | 375 | | |
367 | 376 | | |
368 | 377 | | |
369 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
370 | 401 | | |
371 | 402 | | |
372 | 403 | | |
| |||
Lines changed: 207 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
13 | 47 | | |
14 | 48 | | |
15 | 49 | | |
| |||
58 | 92 | | |
59 | 93 | | |
60 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
61 | 106 | | |
62 | 107 | | |
63 | 108 | | |
| |||
267 | 312 | | |
268 | 313 | | |
269 | 314 | | |
270 | | - | |
271 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
272 | 323 | | |
273 | 324 | | |
274 | 325 | | |
| |||
532 | 583 | | |
533 | 584 | | |
534 | 585 | | |
| 586 | + | |
| 587 | + | |
535 | 588 | | |
536 | 589 | | |
537 | 590 | | |
538 | 591 | | |
539 | 592 | | |
540 | 593 | | |
541 | | - | |
542 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
543 | 613 | | |
544 | 614 | | |
545 | 615 | | |
546 | 616 | | |
547 | 617 | | |
548 | 618 | | |
549 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
550 | 753 | | |
551 | 754 | | |
552 | 755 | | |
| |||
0 commit comments