Commit Graph

98 Commits

Author SHA1 Message Date
Mikhail Yakshin 7c923d3fb2 Pumped copyright year and fixed links 2017-03-30 14:00:05 +03:00
Mikhail Yakshin 4915c068a4 Merge pull request #5 from kaitai-io/feature/csharp-v2
Move down to C# 2.0 features
2017-03-30 13:51:15 +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 9104c76b4c Merge branch 'master' of https://github.com/kaitai-io/kaitai_struct_csharp_runtime 2016-08-10 11:02:19 +03:00
Mikhail Yakshin 52c8d896d8 Added standard runtime library README 2016-08-10 11:01:58 +03:00
Morgan Gangwere 0138a8bb8d Apache -> MIT
Stupid GPL compatibility matrix.

MIT makes things easy. Honestly, I don't care. Let's make it MIT.

signed off by Morgan ``Indrora'' Gangwere <morgan.gangwere@gmail.com>
2016-08-09 10:37:08 -07: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
Mikhail Yakshin 72e01779ad Merge pull request #2 from LogicAndTrick/master
Completed runtime based on BinaryReader and .NET naming standards
2016-07-19 12:39:37 +03: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
Mikhail Yakshin b52d559cdd Added C# gitignore from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 2016-07-16 20:50:12 +03:00
Mikhail Yakshin cd38dd7f52 Added csproj file: now it's a full-blown project, ready to be included into solutions 2016-07-16 20:48:53 +03:00
Mikhail Yakshin 4d69231160 We'll be creating _parent on per-class basis afterall, like in Java, for strict type checking benefits 2016-07-16 17:18:37 +03:00
Mikhail Yakshin 5356d2cc9e Merge branch 'master' of https://github.com/kaitai-io/kaitai_struct_csharp_runtime 2016-07-16 16:38:36 +03:00
Mikhail Yakshin 94cc925cca Added very basic KaitaiStruct implementation 2016-07-16 16:37:56 +03: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
Mikhail Yakshin 9d0f6c385a Merge pull request #1 from indrora/complete-api
KaitaiStream: full API + documentation.
2016-07-15 21:17:33 +03:00
Morgan Gangwere d78c613647 KaitaiStream: full API + documentation. 2016-07-15 09:57:54 -07:00
Mikhail Yakshin d4268d1de6 More efforts to make it compile; phew 2016-07-15 18:26:04 +03:00
Mikhail Yakshin b398797b05 Fix more compile-time errors; readBytes() should throw an exception if it got less than requested 2016-07-15 18:20:47 +03:00
Mikhail Yakshin 4c4cb7e1fa Fixed type names 2016-07-15 17:06:59 +03:00
Mikhail Yakshin d5b47c6d6a Fixed typo 2016-07-15 17:03:21 +03:00
Morgan Gangwere 9ba86edaf0 Initial commit
KaitaiStream: Initial commit
2016-07-15 00:57:37 -07:00
Morgan Gangwere 7afe4c765f Initial commit 2016-07-15 00:53:03 -07:00