Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading data as ints (parsed from 4 bytes) is more difficult than it should be #88

Open
jesseeichar opened this issue Jun 4, 2013 · 0 comments

Comments

@jesseeichar
Copy link
Owner

Right now it is:

val integerTraversable = for { 
   processor <- ByteProcessor(input.bytes.processor) 
    _ <- processor.repeatUntilEmpty  
} yield {
  processor.nextInt
}

integerTraversable.foreach( i => // do something with integer)

or

for { 
   processor <- ByteProcessor(input.bytes.processor) 
    _ <- processor.repeatUntilEmpty  
}  {
  val i = processor.nextInt
// do something with int
}

or

input.blocks(Some(4)).foreach (block => // convert block to int and do something )

That is too much. We need a cleaner way to read data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant