{"action":"created","issue":{"url":"https://api.github.com/repos/9ee1/Capstone.NET/issues/2","labels_url":"https://api.github.com/repos/9ee1/Capstone.NET/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/9ee1/Capstone.NET/issues/2/comments","events_url":"https://api.github.com/repos/9ee1/Capstone.NET/issues/2/events","html_url":"https://github.com/9ee1/Capstone.NET/issues/2","id":97933159,"number":2,"title":"Add `DisassembleStream` method on Capstone class","user":{"login":"uxmal","id":10154465,"avatar_url":"https://avatars.githubusercontent.com/u/10154465?v=3","gravatar_id":"","url":"https://api.github.com/users/uxmal","html_url":"https://github.com/uxmal","followers_url":"https://api.github.com/users/uxmal/followers","following_url":"https://api.github.com/users/uxmal/following{/other_user}","gists_url":"https://api.github.com/users/uxmal/gists{/gist_id}","starred_url":"https://api.github.com/users/uxmal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uxmal/subscriptions","organizations_url":"https://api.github.com/users/uxmal/orgs","repos_url":"https://api.github.com/users/uxmal/repos","events_url":"https://api.github.com/users/uxmal/events{/privacy}","received_events_url":"https://api.github.com/users/uxmal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-29T13:15:41Z","updated_at":"2015-08-10T23:57:02Z","closed_at":null,"body":"Would it be possible to add a method with the signature\r\n```C#\r\nIEnumerable<T1, T2, T3> DisassembleStream(byte[] bytes, int count, long startAddress)\r\n```\r\nto the `Disassembler` class that _lazily_ disassembles the bytes in the byte stream?\r\n\r\nThe use case that I'm dealing with is tracing the disassembly of a basic block, and wanting to stop when I reach instructions like `jmp` or `ret` which terminate basic blocks. It would be very convenient if it were possible to say: \"start disassembling these bytes at this position, and return a lazy stream of instructions.\" . I don't want to disassemble the entire `.text` segment if it turns out the first 10 bytes are code and the remaining 10000 are read-only data."},"comment":{"url":"https://api.github.com/repos/9ee1/Capstone.NET/issues/comments/129650086","html_url":"https://github.com/9ee1/Capstone.NET/issues/2#issuecomment-129650086","issue_url":"https://api.github.com/repos/9ee1/Capstone.NET/issues/2","id":129650086,"user":{"login":"9ee1","id":11975071,"avatar_url":"https://avatars.githubusercontent.com/u/11975071?v=3","gravatar_id":"","url":"https://api.github.com/users/9ee1","html_url":"https://github.com/9ee1","followers_url":"https://api.github.com/users/9ee1/followers","following_url":"https://api.github.com/users/9ee1/following{/other_user}","gists_url":"https://api.github.com/users/9ee1/gists{/gist_id}","starred_url":"https://api.github.com/users/9ee1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9ee1/subscriptions","organizations_url":"https://api.github.com/users/9ee1/orgs","repos_url":"https://api.github.com/users/9ee1/repos","events_url":"https://api.github.com/users/9ee1/events{/privacy}","received_events_url":"https://api.github.com/users/9ee1/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T23:57:02Z","updated_at":"2015-08-10T23:57:02Z","body":"It seems all you're looking for is deferred dissemble of a buffer that terminates when a predicate is met. That can be easily done with very little complexity.\r\n\r\nLet me code up something real quick for you on the develop branch and let me know if it does what you want. "}}