Lines Matching refs:LZMAFile

19 from lzma import LZMACompressor, LZMADecompressor, LZMAError, LZMAFile
537 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
539 with LZMAFile(BytesIO(), "w") as f:
541 with LZMAFile(BytesIO(), "x") as f:
543 with LZMAFile(BytesIO(), "a") as f:
549 with LZMAFile(filename) as f:
551 with LZMAFile(filename, "a") as f:
553 with LZMAFile(filename) as f:
558 with LZMAFile(TESTFN) as f:
560 with LZMAFile(TESTFN, "w") as f:
562 with LZMAFile(TESTFN, "a") as f:
567 with LZMAFile(TESTFN, "r"):
569 with LZMAFile(TESTFN, "rb"):
571 with LZMAFile(TESTFN, "w"):
573 with LZMAFile(TESTFN, "wb"):
575 with LZMAFile(TESTFN, "a"):
577 with LZMAFile(TESTFN, "ab"):
584 with LZMAFile(TESTFN, mode):
587 with LZMAFile(TESTFN, mode):
592 LZMAFile(BytesIO(COMPRESSED_XZ), (3, "x"))
594 LZMAFile(BytesIO(COMPRESSED_XZ), "")
596 LZMAFile(BytesIO(COMPRESSED_XZ), "xt")
598 LZMAFile(BytesIO(COMPRESSED_XZ), "x+")
600 LZMAFile(BytesIO(COMPRESSED_XZ), "rx")
602 LZMAFile(BytesIO(COMPRESSED_XZ), "wx")
604 LZMAFile(BytesIO(COMPRESSED_XZ), "rt")
606 LZMAFile(BytesIO(COMPRESSED_XZ), "r+")
608 LZMAFile(BytesIO(COMPRESSED_XZ), "wt")
610 LZMAFile(BytesIO(COMPRESSED_XZ), "w+")
612 LZMAFile(BytesIO(COMPRESSED_XZ), "rw")
616 LZMAFile(BytesIO(), "w", check=b"asd")
619 LZMAFile(BytesIO(), "w", check=lzma.CHECK_UNKNOWN)
621 LZMAFile(BytesIO(), "w", check=lzma.CHECK_ID_MAX + 3)
624 LZMAFile(BytesIO(COMPRESSED_XZ), check=lzma.CHECK_NONE)
626 LZMAFile(BytesIO(COMPRESSED_XZ), check=lzma.CHECK_CRC32)
628 LZMAFile(BytesIO(COMPRESSED_XZ), check=lzma.CHECK_CRC64)
630 LZMAFile(BytesIO(COMPRESSED_XZ), check=lzma.CHECK_SHA256)
632 LZMAFile(BytesIO(COMPRESSED_XZ), check=lzma.CHECK_UNKNOWN)
636 LZMAFile(BytesIO(), "w", preset=4.39)
638 LZMAFile(BytesIO(), "w", preset=10)
640 LZMAFile(BytesIO(), "w", preset=23)
642 LZMAFile(BytesIO(), "w", preset=-1)
644 LZMAFile(BytesIO(), "w", preset=-7)
646 LZMAFile(BytesIO(), "w", preset="foo")
649 LZMAFile(BytesIO(COMPRESSED_XZ), preset=3)
653 LZMAFile(BytesIO(), "w", filters=[b"wobsite"])
655 LZMAFile(BytesIO(), "w", filters=[{"xyzzy": 3}])
657 LZMAFile(BytesIO(), "w", filters=[{"id": 98765}])
659 LZMAFile(BytesIO(), "w",
662 LZMAFile(BytesIO(), "w",
665 LZMAFile(BytesIO(), "w",
670 LZMAFile(BytesIO(), "w", format=lzma.FORMAT_RAW,
675 f = LZMAFile(src)
677 # LZMAFile.close() should not close the underlying file object.
679 # Try closing an already-closed LZMAFile.
683 # Test with a real file on disk, opened directly by LZMAFile.
685 f = LZMAFile(TESTFN)
688 # Here, LZMAFile.close() *should* close the underlying file object.
690 # Try closing an already-closed LZMAFile.
694 f = LZMAFile(BytesIO(COMPRESSED_XZ))
703 f = LZMAFile(BytesIO(), "w")
711 f = LZMAFile(BytesIO(COMPRESSED_XZ))
718 f = LZMAFile(TESTFN)
727 f = LZMAFile(BytesIO(COMPRESSED_XZ))
736 f = LZMAFile(BytesIO(), "w")
745 f = LZMAFile(src)
753 f = LZMAFile(BytesIO(COMPRESSED_XZ))
762 f = LZMAFile(BytesIO(), "w")
770 f = LZMAFile(BytesIO(COMPRESSED_XZ))
779 f = LZMAFile(BytesIO(), "w")
787 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
790 with LZMAFile(BytesIO(COMPRESSED_ALONE)) as f:
792 with LZMAFile(BytesIO(COMPRESSED_XZ), format=lzma.FORMAT_XZ) as f:
795 with LZMAFile(BytesIO(COMPRESSED_ALONE), format=lzma.FORMAT_ALONE) as f:
798 with LZMAFile(BytesIO(COMPRESSED_RAW_1),
802 with LZMAFile(BytesIO(COMPRESSED_RAW_2),
806 with LZMAFile(BytesIO(COMPRESSED_RAW_3),
810 with LZMAFile(BytesIO(COMPRESSED_RAW_4),
816 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
818 with LZMAFile(BytesIO(COMPRESSED_ALONE)) as f:
820 with LZMAFile(BytesIO(COMPRESSED_XZ), format=lzma.FORMAT_XZ) as f:
822 with LZMAFile(BytesIO(COMPRESSED_ALONE), format=lzma.FORMAT_ALONE) as f:
826 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
837 with LZMAFile(BytesIO(COMPRESSED_XZ * 5)) as f:
839 with LZMAFile(BytesIO(COMPRESSED_XZ + COMPRESSED_ALONE)) as f:
841 with LZMAFile(BytesIO(COMPRESSED_RAW_3 * 4),
851 with LZMAFile(BytesIO(COMPRESSED_XZ * 5)) as f:
857 with LZMAFile(BytesIO(COMPRESSED_XZ + COMPRESSED_BOGUS)) as f:
861 with LZMAFile(BytesIO(COMPRESSED_XZ * 5 + COMPRESSED_BOGUS)) as f:
866 with LZMAFile(TESTFN) as f:
876 with LZMAFile(bytes_filename) as f:
881 with LZMAFile(BytesIO(COMPRESSED_XZ[:128])) as f:
888 with LZMAFile(BytesIO(truncated)) as f:
890 with LZMAFile(BytesIO(truncated)) as f:
895 with LZMAFile(BytesIO(truncated[:i])) as f:
899 f = LZMAFile(BytesIO(COMPRESSED_XZ))
902 with LZMAFile(BytesIO(), "w") as f:
904 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
908 with LZMAFile(BytesIO(COMPRESSED_BOGUS)) as f:
912 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
923 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
927 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
938 with LZMAFile(BytesIO(COMPRESSED_XZ * 5)) as f:
949 f = LZMAFile(BytesIO(COMPRESSED_XZ))
952 with LZMAFile(BytesIO(), "w") as f:
954 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
958 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
963 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
970 with LZMAFile(BytesIO(), "w") as f:
976 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
978 with LZMAFile(BytesIO(COMPRESSED_ALONE)) as f:
980 with LZMAFile(BytesIO(COMPRESSED_XZ), format=lzma.FORMAT_XZ) as f:
982 with LZMAFile(BytesIO(COMPRESSED_ALONE), format=lzma.FORMAT_ALONE) as f:
984 with LZMAFile(BytesIO(COMPRESSED_RAW_2),
991 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
998 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1006 decomp = LZMAFile(BytesIO(bomb))
1014 with LZMAFile(dst, "w") as f:
1019 with LZMAFile(dst, "w", format=lzma.FORMAT_XZ) as f:
1024 with LZMAFile(dst, "w", format=lzma.FORMAT_ALONE) as f:
1029 with LZMAFile(dst, "w", format=lzma.FORMAT_RAW,
1038 with LZMAFile(dst, "w") as f:
1050 with LZMAFile(dst, "w") as f:
1052 with LZMAFile(dst, "a") as f:
1054 with LZMAFile(dst, "a") as f:
1060 with LZMAFile(TESTFN, "w") as f:
1074 with LZMAFile(bytes_filename, "w") as f:
1088 with LZMAFile(TESTFN, "w") as f:
1090 with LZMAFile(TESTFN, "a") as f:
1092 with LZMAFile(TESTFN, "a") as f:
1100 f = LZMAFile(BytesIO(), "w")
1103 with LZMAFile(BytesIO(COMPRESSED_XZ), "r") as f:
1105 with LZMAFile(BytesIO(), "w") as f:
1114 with LZMAFile(dst, "w") as f:
1120 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1125 with LZMAFile(BytesIO(COMPRESSED_XZ * 2)) as f:
1130 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1136 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1141 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1147 with LZMAFile(BytesIO(COMPRESSED_XZ * 2)) as f:
1153 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1158 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1164 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1170 f = LZMAFile(BytesIO(COMPRESSED_XZ))
1173 with LZMAFile(BytesIO(), "w") as f:
1175 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1183 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1192 with LZMAFile(BytesIO(), "w") as f:
1199 f = LZMAFile(BytesIO(COMPRESSED_XZ))
1237 with LZMAFile(BytesIO(), 'w') as f: