Ticket #3 (closed enhancement: worksforme)

Opened 3 years ago

Last modified 1 year ago

Be able to edit datas: add/remove field and edit field value

Reported by: haypo Assigned to:
Priority: normal Milestone:
Component: Keywords:
Cc:

Description

Hachoir should have three major modes:

  • Read only
  • Edit but don't allow to break (file) format
  • Allowed to do everything

Hachoir should be able to edit a filed in a compressed stream: edit a file in a ZIP will edit parent file.

Two different approchs are currently tested:

  • (a) Edit data in place
  • (b) Have two classes: one contains the original datas, the other contains the 'diff' from original datas to edited datas

Approach (a) is very complex to implement because fields have to have two state: original state and new state, and it's hard to know which state is asked... It's also hard to keep data consistent.

With approach (b), read is slower, but it's easier to get original and 'current' states. It's also more natural to see/get what has changed from the original datas.

Done:

  • It's possible to rewrite a file from it's fields representation: each Field class has it's writeInto() method, and OutputStream() is written

Attachments

Change History

09/14/06 01:33:47 changed by haypo

  • status changed from new to closed.
  • resolution set to worksforme.

10/16/06 02:25:01 changed by haypo

  • milestone set to Hachoir 0.6.

12/03/06 04:35:53 changed by haypo

  • milestone changed from Hachoir 0.6 to Hachoir core 1.0.

Milestone Hachoir 0.6 deleted

07/12/07 01:35:29 changed by haypo

  • milestone deleted.

Milestone core-1.0 deleted


Add/Change #3 (Be able to edit datas: add/remove field and edit field value)




Action