Commit Graph

55 Commits

Author SHA1 Message Date
~lucidiot ebda8dbed3 Remove dependency on System.Linq 2021-10-23 20:23:56 +02:00
Petr Pucil 8e944f86d0 Mark EnsureFixedContents() as obsolete 2020-10-03 18:01:07 +02:00
Petr Pucil 4fa7e16050 Add summary of ReadBitsInt{Be,Le}() methods 2020-10-03 18:01:01 +02:00
Petr Pucil 2b39ce9bc8 Simplify ReadBitsIntBe as in kaitai-io/kaitai_struct_java_runtime@e1a30e4 2020-04-27 23:25:47 +02:00
Petr Pucil 37d3c319d9 Shorten ReadBitsInt deprecation warning message 2020-04-26 21:50:27 +02:00
Petr Pucil 0d12292412 Rename ReadBitsInt -> *Be, deprecate ReadBitsInt 2020-04-26 21:29:48 +02:00
Petr Pucil d62f34fcad Implement StringReverse method 2020-03-21 22:41:30 +01:00
Mikhail Yakshin 7e8b72a5b0 Fix typo in docstring 2019-10-24 11:16:52 +01:00
Mikhail Yakshin d8d5e251ad Merge branch 'master' of https://github.com/kaitai-io/kaitai_struct_csharp_runtime 2019-04-17 15:25:52 +01:00
Mikhail Yakshin f8ead93c5a Fixed problem demonstrated by RepeatEosBit test + bumped copyrights 2019-04-17 15:25:44 +01:00
PYAPALLI,SAI KISHORE 0c13bfc90c Kaitai b32 result is inconsistent for some payload because of overflow #12 2019-01-31 12:00:11 -05:00
Mikhail Yakshin 86c9b7dccb Fix EOL whitespace 2018-05-09 07:04:31 +01:00
bibekdw b63c530ef0 Added ReadBitsIntLe method for algorithm specified @ issue#155 2018-05-08 13:57:31 -04:00
Arkadiusz Bulski 632bde8f8a using static IsLittleEndian (thanks @Arlorean) 2018-02-04 15:34:18 +01:00
Arkadiusz Bulski 77a748f2f9 EnsureFixedContents: array compare more proper style, better errormsg 2018-01-22 20:00:29 +01:00
Arkadiusz Bulski 5a9d8f36dd ByteArrayCompare: array.Length field proper, not Count() LINQ 2018-01-22 19:56:02 +01:00
Arkadiusz Bulski eed912a781 cleanup 2018-01-22 19:55:20 +01:00
Mikhail Yakshin fc2f9a48f1 Fix BytesStripRight running into negative indexes 2017-07-22 16:03:45 +03:00
Mikhail Yakshin fcb7bade37 Added ReadBytes() with ulong argument, added more checks on long arguments before int conversion 2017-05-17 13:32:27 +03:00
Mikhail Yakshin d425f77f0b Implemented ByteArrayCompare 2017-04-07 08:13:57 +03:00
Daniel Walder c9af27b536 Break early on error 2017-03-30 20:45:36 +10:00
Daniel Walder 83ed516ca3 Move down to C# 2.0 features
Fixes kaitai-io/kaitai_struct#74
2017-03-30 20:13:32 +10:00
Mikhail Yakshin f925128b6b Implemented same workaround for mask length == 64 as in most other languages 2017-03-01 01:54:56 +03:00
Mikhail Yakshin edb7b09c96 BytesTerminate: implemented support for includeTerminator 2017-02-15 00:22:32 +03:00
Mikhail Yakshin a707442149 Implemented BytesStripRight + BytesTerminate 2017-02-14 20:38:33 +03:00
Mikhail Yakshin 27f4502e5c Removed string handling methods, added readBytesTerm 2017-02-14 16:18:08 +03:00
Mikhail Yakshin 814bd5355f Added AlignToByte(); fixed formatting according to C# standards 2017-02-02 03:18:49 +03:00
Mikhail Yakshin 65f746c2c8 Ported ReadBitsInt to C# 2017-01-08 12:45:46 +03:00
Mikhail Yakshin 923e9c9fc3 EnsureFixedContents: derive length from expected, not pass it as argument 2016-11-22 14:01:26 +03:00
Daniel Walder 07063813c1 Made KaitaiStream.IsEof a property
Also minor code cleanup on other properties
2016-10-29 10:37:38 +10:00
Mikhail Yakshin bd1e9af42c Added long version of Mod 2016-10-13 21:01:04 +03:00
Daniel Walder 5767488867 Add Mod function
See kaitai-io/kaitai_struct#33
2016-10-08 18:19:22 +10:00
Mikhail Yakshin a5e95294a0 Added nested regions 2016-08-09 12:28:21 +03:00
Mikhail Yakshin 1498255c03 Made KaitaiStream.Pos a property, not a method 2016-08-09 12:07:00 +03:00
Mikhail Yakshin c4f278f634 More method + region rearranging 2016-08-09 11:48:58 +03:00
Mikhail Yakshin 8f5fd252ef Some method rearranging, adding recommended regions 2016-08-09 11:43:41 +03:00
Mikhail Yakshin d0e68f7708 Added safeguard against reading past end-of-stream, as per method contract 2016-08-08 17:03:20 +03:00
Mikhail Yakshin 0fe8997f1e Added KaitaiStream#Size; added region and partially rearranged methods 2016-08-08 12:37:55 +03:00
Daniel Walder f9f863de73 Add support for reading floating point formats 2016-07-24 18:29:54 +10:00
Daniel Walder 9f60c18de7 Implemented multi-byte XOR processing 2016-07-24 17:05:00 +10:00
Daniel Walder e3b89666cd Fix the ProcessZlib implementation
This will pass the ZlibWithHeader78 test. .NET's
DeflateStream does not expect zlib's header to be
present in the stream. Trimming it off fixes
the issue.
2016-07-20 22:39:57 +10:00
Daniel Walder 3122ca220a Detect system endianness when reading values
The BitConverter functions use the endianness of
the current system to convert bytes into values.
So when reading LE data on LE system it should not
change, but on a BE system it must be reversed.
2016-07-19 22:23:08 +10:00
Daniel Walder ab67f5ff47 Revert naming changes and a few other corrections 2016-07-18 21:11:58 +10:00
Daniel Walder 6e36771ef8 Add ProcessXorInt implementation 2016-07-17 12:35:31 +10:00
Daniel Walder 6e18002b0a KaitaiStream based off of BinaryReader 2016-07-17 11:54:59 +10:00
Morgan Gangwere 0111e2e9b4 Implement 64-bit reads 2016-07-15 17:11:23 -07:00
Morgan Gangwere 13f4bf2d51 Implement 32-bit reads 2016-07-15 17:10:42 -07:00
Morgan Gangwere 5bf68d7cee style: expand out the shifts
Whitespace exists. It reads nicer to see broken out shifts in 16-bit reads even though there's ony two lines.
2016-07-15 17:08:49 -07:00
Morgan Gangwere 73c830bde9 Sanity check
The theoretical chances of this happening are low. The compiler should complain that you're trying to put >int32.MaxValue in, but a check is totally fine.
2016-07-15 17:07:08 -07:00
Morgan Gangwere d78c613647 KaitaiStream: full API + documentation. 2016-07-15 09:57:54 -07:00