Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6964467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:55:43+00:00 2026-05-27T15:55:43+00:00

I have an embedded application which communicates with a RESTful server over HTTP. Some

  • 0

I have an embedded application which communicates with a RESTful server over HTTP. Some services involve sending some data to the client which is interpreted using a very simple lexer I wrote using flex.

Now I’m in the process of adding a gzip compression layer to reduce bandwidth consumption but I’m not satisfied with the current architecture because of the memory requirements: first I receive the whole data in a buffer, then I decompress the whole buffer into a new buffer and then I feed the whole data to flex.

I can save some memory between the first and second steps by feeding chunked data from the HTTP client to the zlib routines. But I’m wondering whether it’s possible to do the same between the zlib chunked output and the flex input.

Currently I use only yy_scan_bytes and yylex to analyze the input. Does flex have any feature to feed multiple chunks of data to yylex? I’ve read the documentation about multiple input buffers but to no avail.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:55:43+00:00Added an answer on May 27, 2026 at 3:55 pm

    YY_INPUT seems to be the correct answer:

    The nature of how [the scanner] gets its input can be controlled by defining the
    YY_INPUT macro. The calling sequence for YY_INPUT() is
    YY_INPUT(buf,result,max_size). Its action is to place up to max_size
    characters in the character array buf and return in the integer
    variable result either the number of characters read or the constant
    YY_NULL (0 on Unix systems) to indicate `EOF’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a standalone Java application which will have a embedded HTTP
I am creating an Android application which will have some embedded music inside of
I have a web reference for our report server embedded in our application. The
I have a C++ application which connects to a MySQL server. It all works
We have an embedded linux product with an application which lets the user change
I have a WPF application in which I have an embedded web browser control.
We have an application which uses SQLite as an embedded RDBMS. Initially the application
I have embedded some crystal reports in my C# application. The problem is, compiling
I have a fairly sophisticated server-side application which frequently requires me to see what
I have an embedded application which will have a bootloader which will decide to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.