129 Commits

Author SHA1 Message Date
dependabot[bot]
a5cd6d3ad6 Bump AssetRipper.Primitives from 3.1.2 to 3.1.3
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 21:35:27 -07:00
ds5678
2e4ce635d0 Reduce allocations for UTF8 truncation
* Resolves #1424
2024-07-29 21:35:43 -07:00
Jakob Hellermann
716a07f50b
fix file name truncation in presence of non-ascii characters (#1402)
* fix file name truncation in presence of non-ascii characters

* review: remove unnecessary -4 of maxNameLength

* review: count byte length of extension

* review: fix typo three -> four

* review: rename byteLength -> maxLength

* review: fix case where last character is incorrectly truncated

* Add some unit tests
2024-07-10 20:04:52 -07:00
ds5678
0d994ae697 Fix max file name length
* Resolves #1372
2024-06-29 16:03:00 -07:00
dependabot[bot]
670e92cbc3 Bump AssetRipper.Primitives from 3.1.1 to 3.1.2
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.1...3.1.2)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-02 21:35:57 -04:00
ds5678
afd9c713aa Move AssetRipper.IO.Endian to its own repository
* Related: #1094
2024-05-27 10:18:01 -07:00
ds5678
1b4ece2b2d Rework creation of temporary files and directories
* Temporary folder under AssetRipper is unique to allow multiple instances.
* SmartStream now uses this folder too
2024-05-25 13:46:30 -07:00
wd357dui
2c2769ed79
fix alignment and missing script types for writing of SerializedFile (#1365)
* fix alignment and missing script types for writing of `SerializedFile`

for the `Write` method of `SerializedFile`:
 - add script types
 - `objectDataPosition` is aligned to 16 bytes
 - each object data is aligned to 8 bytes

Tested by reading and writing back (replacing) a game's `globalgamemanagers.assets` file (the game has unity version `2022.3.6f1`); with those script types and alignments changes the game won't crash on startup anymore

* fix alignment and missing script types for writing of `SerializedFile`
2024-05-24 14:28:28 -07:00
dependabot[bot]
46588a64cb Bump ZstdSharp.Port from 0.8.0 to 0.8.1
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.8.0...0.8.1)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-19 18:14:01 -04:00
dependabot[bot]
c2463c765e Bump AssetRipper.Primitives from 3.1.0 to 3.1.1
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-19 18:08:25 -04:00
GameTechGuides
5b87c961b6
Replace commas, brackets, and control characters with underscores (#1345)
* Sanitize filenames to exclude commas, brackets, and control characters

* Add Missing Things
2024-05-18 12:21:32 -04:00
ds5678
c33b69976c Type Tree Deserialization Improvements:
* Proper support for stream alignment
* Use unchecked casts when writing and walking
* Support CopyValues from different SerializableType
* Remove duplicate serializedVersion
* Ensure proper type name is used for array-like fields
* Support creating Unity class release and editor trees from the embedded Tpk
* Support Unity 3 named vector nodes
* Resolves #1328
2024-05-07 20:00:49 -07:00
dependabot[bot]
4c7e140079 Bump SharpCompress from 0.36.0 to 0.37.2
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.36.0 to 0.37.2.
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.36.0...0.37.2)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 09:43:51 -07:00
dependabot[bot]
4f4f67d07d Bump ZstdSharp.Port from 0.7.6 to 0.8.0
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.7.6 to 0.8.0.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.7.6...0.8.0)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 09:39:56 -07:00
dependabot[bot]
ece142526c Bump AssetRipper.Primitives from 3.0.0 to 3.1.0
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/3.0.0...3.1.0)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-21 19:00:18 -07:00
ds5678
1c9036fcb5 Fix issue with SpriteInformationObject being generated for engine assets 2024-04-20 20:53:01 -07:00
ds5678
b0213ae1bb Bump AssetRipper.Primitives 2024-04-15 20:01:48 -07:00
dependabot[bot]
d85c4fbe6a
Bump ZstdSharp.Port from 0.7.5 to 0.7.6 (#1270)
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.7.5 to 0.7.6.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.7.5...0.7.6)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-24 19:20:22 -07:00
dependabot[bot]
07df7b117a Bump K4os.Compression.LZ4 from 1.3.6 to 1.3.8
Bumps [K4os.Compression.LZ4](https://github.com/MiloszKrajewski/K4os.Compression.LZ4) from 1.3.6 to 1.3.8.
- [Release notes](https://github.com/MiloszKrajewski/K4os.Compression.LZ4/releases)
- [Changelog](https://github.com/MiloszKrajewski/K4os.Compression.LZ4/blob/master/CHANGES.md)
- [Commits](https://github.com/MiloszKrajewski/K4os.Compression.LZ4/compare/1.3.6...1.3.8)

---
updated-dependencies:
- dependency-name: K4os.Compression.LZ4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 19:08:50 -07:00
ds5678
f423c9ed7a Use memory stream for larger decompression sizes in asset bundles
* Resolves #1120
2024-02-28 00:22:27 -05:00
dependabot[bot]
f4474c0ad4 Bump ZstdSharp.Port from 0.7.4 to 0.7.5
Bumps [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) from 0.7.4 to 0.7.5.
- [Release notes](https://github.com/oleg-st/ZstdSharp/releases)
- [Commits](https://github.com/oleg-st/ZstdSharp/compare/0.7.4...0.7.5)

---
updated-dependencies:
- dependency-name: ZstdSharp.Port
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-04 12:01:37 -05:00
dependabot[bot]
91791274fa Bump AssetRipper.Primitives from 2.1.0 to 2.1.1
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/2.1.0...2.1.1)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 07:06:32 -05:00
dependabot[bot]
77a278bd45 Bump SharpCompress from 0.35.0 to 0.36.0
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.35.0 to 0.36.0.
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.35.0...0.36.0)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 07:05:41 -05:00
ds5678
03528260c7 Replace uses of BitConverter with BinaryPrimitives 2024-01-13 09:03:20 -05:00
Jeremy Pritts
7a9f598204 Check for negative size before array allocation
* Related: #1143
2023-12-25 12:50:33 -05:00
Jeremy Pritts
86923fa05c NuGet bump
* Support newer Unity versions
* Resolve issues with breaking AssetRipper.Primitives changes
2023-12-23 02:23:42 -05:00
Jeremy Pritts
3fd7bbc599 Update CommonString 2023-12-09 18:02:08 -05:00
Razmoth
b126333d49
Implement Zstd support (#1125)
* Implement `Zstd` support.

* Implement requested changes
2023-12-09 03:26:39 -05:00
Jeremy Pritts
7f38a9548d Separate Lzham into its own throw method 2023-12-08 17:29:39 -05:00
Jeremy Pritts
43f0bf58a9 Update error messages for failed decompression 2023-12-08 17:11:42 -05:00
Jeremy Pritts
badf1c954b PartialStream Fix
* Creating or disposing a PartialStream should not change the parent stream's Position
* Fixes a bug in 277da8e051224eb883bfb3a48c9ab8b05fb2622a
2023-11-18 19:10:34 -05:00
dependabot[bot]
a429e5ff11 Bump SharpCompress from 0.34.1 to 0.34.2
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.34.1 to 0.34.2.
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.34.1...0.34.2)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-17 12:07:12 -05:00
Jeremy Pritts
277da8e051 Small performance improvements 2023-11-13 18:00:27 -05:00
Jeremy Pritts
ceea3684ff Use UnsupportedBundleDecompression in BundleFileBlockReader 2023-11-12 11:42:16 -05:00
Jeremy Pritts
26c68441f6 Fix some nullable warnings 2023-10-25 23:46:20 -04:00
Jeremy Pritts
ef7460f98d Code cleanup
* Documentation
* Some extension methods
* Allow null in FilenameUtils
2023-10-13 13:32:31 -04:00
dependabot[bot]
8c54dc0ec1 Bump SharpCompress from 0.34.0 to 0.34.1
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.34.0 to 0.34.1.
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.34.0...0.34.1)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-07 23:53:27 -04:00
dependabot[bot]
ffa6b06af6 Bump SharpCompress from 0.33.0 to 0.34.0
Bumps [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/adamhathcock/sharpcompress/releases)
- [Commits](https://github.com/adamhathcock/sharpcompress/compare/0.33.0...0.34.0)

---
updated-dependencies:
- dependency-name: SharpCompress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-19 00:40:44 -04:00
Jeremy Pritts
c7961747a6 [skip ci] documentation in AssetRipper.IO.Files 2023-09-19 00:38:08 -04:00
dependabot[bot]
dfc3f7f65a Bump AssetRipper.Primitives from 2.0.0 to 2.0.1
Bumps [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/AssetRipper/AssetRipper.Primitives/releases)
- [Commits](https://github.com/AssetRipper/AssetRipper.Primitives/compare/2.0.0.0...2.0.1.0)

---
updated-dependencies:
- dependency-name: AssetRipper.Primitives
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-15 02:09:41 -04:00
Jeremy Pritts
d50ee0995e More specific exception for unsupported bundle decompression 2023-09-04 23:58:15 -04:00
Jeremy Pritts
15f53a27ec SerializedFile write support 2023-09-02 02:01:10 -04:00
Jeremy Pritts
546bd80a72 SerializedFileMetadata can be as small as 13 bytes 2023-09-02 01:58:02 -04:00
Jeremy Pritts
234785f0fb SerializedType write support 2023-09-02 01:57:07 -04:00
Jeremy Pritts
ffcf69d60d Convert ObjectInfo to a struct 2023-09-02 01:56:10 -04:00
Jeremy Pritts
6ddb8cc2dd Starting code for writing SerializedFiles 2023-08-30 23:52:31 -04:00
Jeremy Pritts
896131f828 SerializedFile.Generation 2023-08-30 23:14:26 -04:00
Jeremy Pritts
ea2b6d10cb Don't store header and metadata in SerializedFile 2023-08-30 23:11:19 -04:00
Jeremy Pritts
e84b296d6f Make SerializedFile.Metadata private 2023-08-30 22:55:24 -04:00
Jeremy Pritts
c9cb59e26a Remove FileAnalyzer 2023-08-30 22:42:10 -04:00